X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost89.c;h=953c6ec7788e96a45141dd6f0f03ea34ebdd9af0;hb=1a2714eb8f2c526517a01c90bb02ccd0e22f4c08;hp=f940dab384b57cd0ca3ca76400077a498cb49ac5;hpb=53579492efb0cfa87405a7a4b1956ffec9506a22;p=openssl-gost%2Fengine.git diff --git a/gost89.c b/gost89.c index f940dab..953c6ec 100644 --- a/gost89.c +++ b/gost89.c @@ -452,7 +452,7 @@ void gost_enc_with_key(gost_ctx * c, byte * key, byte * inblock, void gost_key(gost_ctx * c, const byte * k) { int i, j; - RAND_bytes((unsigned char *)c->mask, sizeof(c->mask)); + RAND_priv_bytes((unsigned char *)c->mask, sizeof(c->mask)); for (i = 0, j = 0; i < 8; ++i, j += 4) { c->key[i] = (k[j] | (k[j + 1] << 8) | (k[j + 2] << 16) | ((word32) k[j + 3] << @@ -464,7 +464,7 @@ void gost_key(gost_ctx * c, const byte * k) void magma_key(gost_ctx * c, const byte * k) { int i, j; - RAND_bytes((unsigned char *)c->mask, sizeof(c->mask)); + RAND_priv_bytes((unsigned char *)c->mask, sizeof(c->mask)); for (i = 0, j = 0; i < 8; ++i, j += 4) { c->key[i] = (k[j + 3] | (k[j + 2] << 8) | (k[j + 1] << 16) | ((word32) k[j] <<