1 // Copyright 2020 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 #include "textflag.h"
6
7 // func kdsa(fc uint64, params *[4096]byte) (errn uint64)
8 TEXT ·kdsa(SB), NOSPLIT|NOFRAME, $0-24
9 MOVD fc+0(FP), R0 // function code
10 MOVD params+8(FP), R1 // address parameter block
11
12 loop:
13 WORD $0xB93A0008 // compute digital signature authentication
14 BVS loop // branch back if interrupted
15 BGT retry // signing unsuccessful, but retry with new CSPRN
16 BLT error // condition code of 1 indicates a failure
17
18 success:
19 MOVD $0, errn+16(FP) // return 0 - sign/verify was successful
20 RET
21
22 error:
23 MOVD $1, errn+16(FP) // return 1 - sign/verify failed
24 RET
25
26 retry:
27 MOVD $2, errn+16(FP) // return 2 - sign/verify was unsuccessful -- if sign, retry with new RN
28 RET
29
View as plain text