Lines Matching refs:ctx
911 struct streebog_state *ctx = shash_desc_ctx(desc); in streebog_init() local
915 memset(ctx, 0, sizeof(struct streebog_state)); in streebog_init()
918 ctx->h.qword[i] = cpu_to_le64(0x0101010101010101ULL); in streebog_init()
965 static void streebog_stage2(struct streebog_state *ctx, const u8 *data) in streebog_stage2() argument
971 streebog_g(&ctx->h, &ctx->N, &m); in streebog_stage2()
973 streebog_add512(&ctx->N, &buffer512, &ctx->N); in streebog_stage2()
974 streebog_add512(&ctx->Sigma, &m, &ctx->Sigma); in streebog_stage2()
977 static void streebog_stage3(struct streebog_state *ctx, const u8 *src, in streebog_stage3() argument
990 streebog_g(&ctx->h, &ctx->N, &u.m); in streebog_stage3()
991 streebog_add512(&ctx->N, &buf, &ctx->N); in streebog_stage3()
992 streebog_add512(&ctx->Sigma, &u.m, &ctx->Sigma); in streebog_stage3()
994 streebog_g(&ctx->h, &buffer0, &ctx->N); in streebog_stage3()
995 streebog_g(&ctx->h, &buffer0, &ctx->Sigma); in streebog_stage3()
996 memcpy(&ctx->hash, &ctx->h, sizeof(struct streebog_uint512)); in streebog_stage3()
1002 struct streebog_state *ctx = shash_desc_ctx(desc); in streebog_update() local
1005 streebog_stage2(ctx, data); in streebog_update()
1016 struct streebog_state *ctx = shash_desc_ctx(desc); in streebog_finup() local
1018 streebog_stage3(ctx, src, len); in streebog_finup()
1020 memcpy(digest, &ctx->hash.qword[4], STREEBOG256_DIGEST_SIZE); in streebog_finup()
1022 memcpy(digest, &ctx->hash.qword[0], STREEBOG512_DIGEST_SIZE); in streebog_finup()