1 C nettle, low-level cryptographics library
3 C Copyright (C) 2013, Niels Möller
5 C The nettle library is free software; you can redistribute it and/or modify
6 C it under the terms of the GNU Lesser General Public License as published by
7 C the Free Software Foundation; either version 2.1 of the License, or (at your
8 C option) any later version.
10 C The nettle library is distributed in the hope that it will be useful, but
11 C WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 C or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13 C License for more details.
15 C You should have received a copy of the GNU Lesser General Public License
16 C along with the nettle library; see the file COPYING.LIB. If not, write to
17 C the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 .file "ecc-192-modp.asm"
23 define(<HP>, <r0>) C Overlaps unused ecc argument
34 define(<H0>, <T0>) C Overlaps T0 and T1
39 C ecc_192_modp (const struct ecc_curve *ecc, mp_limb_t *rp)
43 PROLOGUE(nettle_ecc_192_modp)
44 push {r4,r5,r6,r7,r8,r10}
45 C Reduce two words at a time
49 ldm RP, {T2,T3,T4,T5,T6,T7}
55 C Need to add carry to T2 and T4, do T4 later.
64 C Need to add carry to T0 and T2, do T2 later
89 stm RP, {T0,T1,T2,T3,T4,T5}
91 pop {r4,r5,r6,r7,r8,r10}
93 EPILOGUE(nettle_ecc_192_modp)