X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=sha256-asm.S;h=392bf421efe911ea770e57d6d1ce64c04eb8027e;hb=96ebafd201c9e8441c7677577b24aa402c1defc6;hp=0769e7cd28e5a8e41d2c0f6356ed6c1c1cc2f0be;hpb=3c995d0a8faeb9d37927d48e20fc45d839e066ea;p=avr-crypto-lib.git diff --git a/sha256-asm.S b/sha256-asm.S index 0769e7c..392bf42 100644 --- a/sha256-asm.S +++ b/sha256-asm.S @@ -1,3 +1,21 @@ +/* sha256-asm.S */ +/* + This file is part of the Crypto-avr-lib/microcrypt-lib. + Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de) + + 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ /* * Author: Daniel Otte * @@ -96,8 +114,8 @@ SREG = 0x3F ;########################################################### .global sha256_ctx2hash -; === sha256_lastBlock === -; this function does padding & Co. for calculating SHA-256 hashes +; === sha256_ctx2hash === +; this function converts a state into a normal hash (bytestring) ; param1: the 16-bit destination pointer ; given in r25,r24 (r25 is most significant) ; param2: the 16-bit pointer to sha256_ctx structure @@ -840,13 +858,13 @@ update_state_loop: add r20, r21 st Z+, r20 clr r21 -sha256_nexBlock_fix_length: +sha256_nextBlock_fix_length: brcc sha256_nextBlock_epilog ld r20, Z adc r20, r21 st Z+, r20 dec r22 - brne sha256_nexBlock_fix_length + brne sha256_nextBlock_fix_length ; EPILOG sha256_nextBlock_epilog: