3 This file is part of the AVR-Crypto-Lib.
4 Copyright (C) 2009 Daniel Otte (daniel.otte@rub.de)
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 * \file shabal224-asm.S
22 * \email daniel.otte@rub.de
24 * \license GPLv3 or later
27 #include "avr-asm-macros.S"
29 /******************************************************************************/
33 .long 0xA5201467, 0xA9B8D94A, 0xD4CED997, 0x68379D7B
34 .long 0xA7FC73BA, 0xF1A2546B, 0x606782BF, 0xE0BCFD0F
35 .long 0x2F25374E, 0x069A149F, 0x5E2DFF25, 0xFAECF061
37 .long 0xEC9905D8, 0xF21850CF, 0xC0A746C8, 0x21DAD498
38 .long 0x35156EEB, 0x088C97F2, 0x26303E40, 0x8A2D4FB5
39 .long 0xFEEE44B6, 0x8A1E9573, 0x7B81111A, 0xCBC139F0
40 .long 0xA3513861, 0x1D2C362E, 0x918C580E, 0xB58E1B9C
42 .long 0xE4B573A1, 0x4C1A0880, 0x1E907C51, 0x04807EFD
43 .long 0x3AD8CDE5, 0x16B21302, 0x02512C53, 0x2204CB18
44 .long 0x99405F2D, 0xE5B648A1, 0x70AB1D43, 0xA10C25C2
45 .long 0x16F1AC05, 0x38BBEB56, 0x9B01DC60, 0xB1096D83
48 /******************************************************************************/
52 .global shabal224_init
73 ldi r30, lo8(shabal224_iv)
74 ldi r31, hi8(shabal224_iv)
87 /******************************************************************************/
89 .global shabal224_ctx2hash
96 adiw r30, (16-224/32)*4
104 /******************************************************************************/
106 * param dest: r24:r25
108 * param length_b: r18:r21
123 stack_alloc_large 188
124 adiw r30, 1 /* Z points to stack space (ctx) */
140 rcall shabal_nextBlock
152 rcall shabal_lastBlock
155 rcall shabal224_ctx2hash
156 stack_free_large2 188