]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - dsa/dsa_key_blob.c
fixing E-Mail-Address & Copyright
[avr-crypto-lib.git] / dsa / dsa_key_blob.c
index fe31e53d71272788cdce9713af1e993ebe0bc0a7..a46020c5308f9ab2d92f09c7a7918360d879c56e 100644 (file)
@@ -1,7 +1,7 @@
 /* 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
@@ -37,7 +37,7 @@
 #define ALL_LEN_B (PRIV_LEN_B+PUB_LEN_B+P_LEN_B+Q_LEN_B+G_LEN_B)
 
 
-static uint8_t dsa_key_blob[] PROGMEM = {
+static const uint8_t dsa_key_blob[] PROGMEM = {
 
 //     priv:
        0xac, 0xe6, 0xef, 0x99, 0x08, 0xe8, 0x5f, 0xc8,
@@ -87,7 +87,7 @@ static uint8_t dsa_key_blob[] PROGMEM = {
 #define G_LEN_B (16*8)
 #define ALL_LEN_B (PRIV_LEN_B+PUB_LEN_B+P_LEN_B+Q_LEN_B+G_LEN_B)
 
-static uint8_t dsa_key_blob[] PROGMEM = {
+static const uint8_t dsa_key_blob[] PROGMEM = {
        // priv:
        0x03, 0xad, 0x17, 0x81, 0x0f, 0x70, 0x7f, 0x89,
        0xa2, 0x0a, 0x70, 0x1c, 0x3b, 0x24, 0xff, 0xd2,
@@ -159,7 +159,7 @@ static uint8_t dsa_key_blob[] PROGMEM = {
 #define G_LEN_B (32*8)
 #define ALL_LEN_B (PRIV_LEN_B+PUB_LEN_B+P_LEN_B+Q_LEN_B+G_LEN_B)
 
-static uint8_t dsa_key_blob[] PROGMEM = {
+static const uint8_t dsa_key_blob[] PROGMEM = {
 /* priv: */
        0x1d, 0xe4, 0x81, 0x02, 0x52, 0x6b, 0x2b, 0x0e,
        0x98, 0x08, 0xc8, 0xb9, 0x81, 0x40, 0xd1, 0x1e,
@@ -270,7 +270,7 @@ static uint8_t dsa_key_blob[] PROGMEM = {
 };
 #endif
 
-void load_dsa_key_blob(dsa_ctx_tctx){
+void load_dsa_key_blob(dsa_ctx_t *ctx){
        if(ctx->priv.wordv){
                free(ctx->priv.wordv);
        }
@@ -280,15 +280,15 @@ void load_dsa_key_blob(dsa_ctx_t* ctx){
                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));