Skip to main content
. 2023 Jan 19;23(3):1164. doi: 10.3390/s23031164
Algorithm 5 ECDSA_Sign_SKX{msg}
Input.n,P,msg,d,
Output.(r,s)
 1: select a random integer or a pseudo-random integer k[1,n1]
 2: calculate the solution point of the curve P=(x,y)=kP, and r=xmodn. If r=0, then skip to step 1
 3: calculate t=k1modn
 4: calculate e=H(msg), where H is the hash function SHA-256, which produces a 256-bit hash value
 5: calculate s=k1(e+dr)modn. If s=0, then skip to step 1
 6: return the signature of msg is (r,s)