Skip to main content
. 2023 Jan 19;23(3):1164. doi: 10.3390/s23031164
Algorithm 6 ECDSA_Verify_PKX{msg}
Input.(r,s),n,msg,P,Q
Output. accept/reject (r,s)
 1: check whether r and s are integers between 1 and n1
 2: calculate a 256-bit Hash value e=H(msg) using hash function SHA-256
 3: calculate w=s1modn
 4: calculate u1=ew and u2=rw
 5: calculate solution point X=(x1,y1)=u1P+u2Q
 6: if X=0, reject (r,s), otherwise compute v=x1modn
 7: if and only if v=r, accept (r,s)