]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - md5.c
Grøstl in large (384 & 512 bit); warning: freaking linker
[avr-crypto-lib.git] / md5.c
diff --git a/md5.c b/md5.c
index ac07042bcc83dfe372d71a696617f0a7ee422f0d..20ec519c961a9152c235d8653351da9d0bbbee20 100644 (file)
--- a/md5.c
+++ b/md5.c
@@ -1,6 +1,6 @@
 /* md5.c */
 /*
-    This file is part of the Crypto-avr-lib/microcrypt-lib.
+    This file is part of the AVR-Crypto-Lib.
     Copyright (C) 2008  Daniel Otte (daniel.otte@rub.de)
 
     This program is free software: you can redistribute it and/or modify
@@ -80,7 +80,8 @@ void md5_core(uint32_t* a, void* block, uint8_t as, uint8_t s, uint8_t i, uint8_
        uart_hexdump(&s, 1); uart_putc(' ');
        uart_hexdump(&i, 1); uart_putc(']');
 #endif 
-       t = a[as] + funcs[fi](a[(as+1)&3], a[(as+2)&3], a[(as+3)&3]) + *((uint32_t*)block) + md5_T[i] ;
+       t = a[as] + funcs[fi](a[(as+1)&3], a[(as+2)&3], a[(as+3)&3]) 
+           + *((uint32_t*)block) + pgm_read_dword(md5_T+i) ;
        a[as]=a[(as+1)&3] + ROTL32(t, s);
 }