3 This file is part of the AVR-Crypto-Lib.
4 Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org)
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 shabal512-asm.S
22 * \email bg@nerilex.org
24 * \license GPLv3 or later
27 #include "avr-asm-macros.S"
29 /******************************************************************************/
33 .long 0x20728DFD, 0x46C0BD53, 0xE782B699, 0x55304632
34 .long 0x71B4EF90, 0x0EA9E82C, 0xDBB930F1, 0xFAD06B8B
35 .long 0xBE0CAE40, 0x8BD14410, 0x76D2ADAC, 0x28ACAB7F
37 .long 0xC1099CB7, 0x07B385F3, 0xE7442C26, 0xCC8AD640
38 .long 0xEB6F56C7, 0x1EA81AA9, 0x73B9D314, 0x1DE85D08
39 .long 0x48910A5A, 0x893B22DB, 0xC5A0DF44, 0xBBC4324E
40 .long 0x72D2F240, 0x75941D99, 0x6D8BDE82, 0xA1A7502B
42 .long 0xD9BF68D1, 0x58BAD750, 0x56028CB2, 0x8134F359
43 .long 0xB5D469D8, 0x941A8CC2, 0x418B2A6E, 0x04052780
44 .long 0x7F07D787, 0x5194358F, 0x3C60D665, 0xBE97D79A
45 .long 0x950C3434, 0xAED9A06D, 0x2537DC8D, 0x7CDB5969
47 /******************************************************************************/
51 .global shabal512_init
72 ldi r30, lo8(shabal512_iv)
73 ldi r31, hi8(shabal512_iv)
86 /******************************************************************************/
88 .global shabal512_ctx2hash
95 ; adiw r30, (16-512/32)*4
103 /******************************************************************************/
105 * param dest: r24:r25
107 * param length_b: r18:r21
122 stack_alloc_large 188
123 adiw r30, 1 /* Z points to stack space (ctx) */
139 rcall shabal_nextBlock
151 rcall shabal_lastBlock
154 rcall shabal512_ctx2hash
155 stack_free_large2 188