forked from wolfSSL/wolfssl
optimize hash-drbg layout, save 12 bytes on 64bit
This commit is contained in:
@@ -149,11 +149,11 @@ enum {
|
|||||||
|
|
||||||
typedef struct DRBG {
|
typedef struct DRBG {
|
||||||
Sha256 sha;
|
Sha256 sha;
|
||||||
|
word32 reseedCtr;
|
||||||
|
word32 lastBlock;
|
||||||
byte digest[SHA256_DIGEST_SIZE];
|
byte digest[SHA256_DIGEST_SIZE];
|
||||||
byte V[DRBG_SEED_LEN];
|
byte V[DRBG_SEED_LEN];
|
||||||
byte C[DRBG_SEED_LEN];
|
byte C[DRBG_SEED_LEN];
|
||||||
word32 reseedCtr;
|
|
||||||
word32 lastBlock;
|
|
||||||
byte matchCount;
|
byte matchCount;
|
||||||
} DRBG;
|
} DRBG;
|
||||||
|
|
||||||
|
@@ -82,8 +82,8 @@ struct DRBG; /* Private DRBG state */
|
|||||||
|
|
||||||
/* Hash-based Deterministic Random Bit Generator */
|
/* Hash-based Deterministic Random Bit Generator */
|
||||||
typedef struct RNG {
|
typedef struct RNG {
|
||||||
OS_Seed seed;
|
|
||||||
struct DRBG* drbg;
|
struct DRBG* drbg;
|
||||||
|
OS_Seed seed;
|
||||||
byte status;
|
byte status;
|
||||||
} RNG;
|
} RNG;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user