<menu id="guoca"></menu>
<nav id="guoca"></nav><xmp id="guoca">
  • <xmp id="guoca">
  • <nav id="guoca"><code id="guoca"></code></nav>
  • <nav id="guoca"><code id="guoca"></code></nav>

    5.5 RSA密鑰數據結構定義

    RSA密鑰結構存儲時順序為從高到低,即密鑰存放時從密鑰結構數組的最高位開始,最高字節填在最高位,不足位填充數據0。

    #define RSAref_MAX_BITS
    
    2048
    
    #define RSAref_MAX_LEN
    
    ((RSAref_MAX_BITS + 7) / 8)
    
    #define RSAref_MAX_PBITS
    
    ((RSAref_MAX_BITS + 1) / 2)
    
    #define RSAref_MAX_PLEN
    
    ((RSAref_MAX_PBITS + 7)/ 8)
    
    typedef struct RSArefPublicKey_st
    
    {
    
    UINT32
    
    bits;
    
    BYTE m[RSAref_MAX_LEN];
    
    BYTE e[RSAref_MAX_LEN];
    
    } RSArefPublicKey;
    
    typedef struct RSArefPrivateKey_st
    
    {
    
    UINT32
    
    bits;
    
    BYTE m[RSAref_MAX_LEN];
    
    BYTE e[RSAref_MAX_LEN];
    
    BYTE d[RSAref_MAX_LEN];
    
    BYTE prime[2][RSAref_MAX_PLEN];GB/T XXXXXXXX
    
    6
    
    BYTE pexp[2][RSAref_MAX_PLEN];
    
    BYTE coef[RSAref_MAX_PLEN];
    
    } RSArefPrivateKey;

    本文章首發在 網安wangan.com 網站上。

    上一篇 下一篇
    討論數量: 0
    只看當前版本


    暫無話題~
    亚洲 欧美 自拍 唯美 另类