/* dsa_key_blob.c */
/*
This file is part of the AVR-Crypto-Lib.
- Copyright (C) 2010 Daniel Otte (daniel.otte@rub.de)
+ Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
};
#endif
-void load_dsa_key_blob(dsa_ctx_t* ctx){
+void load_dsa_key_blob(dsa_ctx_t *ctx){
if(ctx->priv.wordv){
free(ctx->priv.wordv);
}
return;
}
memcpy_P(ctx->priv.wordv, dsa_key_blob, ALL_LEN_B);
- ctx->priv.length_B=PRIV_LEN_B;
+ ctx->priv.length_W=PRIV_LEN_B;
ctx->pub.wordv = ctx->priv.wordv+PRIV_LEN_B;
- ctx->pub.length_B = PUB_LEN_B;
+ ctx->pub.length_W = PUB_LEN_B;
ctx->domain.p.wordv = ctx->priv.wordv+PRIV_LEN_B+PUB_LEN_B;
- ctx->domain.p.length_B = P_LEN_B;
+ ctx->domain.p.length_W = P_LEN_B;
ctx->domain.q.wordv = ctx->priv.wordv+PRIV_LEN_B+PUB_LEN_B+P_LEN_B;
- ctx->domain.q.length_B = Q_LEN_B;
+ ctx->domain.q.length_W = Q_LEN_B;
ctx->domain.g.wordv = ctx->priv.wordv+PRIV_LEN_B+PUB_LEN_B+P_LEN_B+Q_LEN_B;
- ctx->domain.g.length_B = G_LEN_B;
+ ctx->domain.g.length_W = G_LEN_B;
bigint_changeendianess(&(ctx->priv));
bigint_changeendianess(&(ctx->pub));