X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost89.c;h=9011e1d8bc60b6cb8a85e3aeb124ec8001865a47;hb=c5958ad35eb481ec342fef73bb4544fd8846eeb5;hp=47b7ba0227c5aec79e04fac4ffc54d318c00f588;hpb=70c5f3b3b65ed156144ca64ac666dc4400d51e19;p=openssl-gost%2Fengine.git diff --git a/gost89.c b/gost89.c index 47b7ba0..9011e1d 100644 --- a/gost89.c +++ b/gost89.c @@ -449,6 +449,17 @@ void gost_key(gost_ctx * c, const byte * k) } } +/* Set 256 bit key into context */ +void magma_key(gost_ctx * c, const byte * k) +{ + int i, j; + for (i = 7, j = 0; i >= 0; i--, j += 4) { + c->k[i] = + k[j] | (k[j + 1] << 8) | (k[j + 2] << 16) | ((word32) k[j + 3] << + 24); + } +} + /* Retrieve 256-bit key from context */ void gost_get_key(gost_ctx * c, byte * k) {