...
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)
8TEXT ·kdsa(SB), NOSPLIT|NOFRAME, $0-24
9 MOVD fc+0(FP), R0 // function code
10 MOVD params+8(FP), R1 // address parameter block
11
12loop:
13 KDSA R0, R4 // 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
18success:
19 MOVD $0, errn+16(FP) // return 0 - sign/verify was successful
20 RET
21
22error:
23 MOVD $1, errn+16(FP) // return 1 - sign/verify failed
24 RET
25
26retry:
27 MOVD $2, errn+16(FP) // return 2 - sign/verify was unsuccessful -- if sign, retry with new RN
28 RET
View as plain text