Skip to content

qasim12343/DigitalSignatureAlgorithm-DSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

DigitalSignatureAlgorithm-DSA

DSA

  • p -> Prime Number 2^L-1 < p < 2^L
  • q -> prime divisor of (p-1)
  • g -> h^(p-1)q mod p
  • h -> any Integer (1 < h < p-1)
  • x -> sender private key random number between 0 and q
  • y -> public key g^x mod p
  • k -> any Integer (0 < k < q)

Signature

  • r = (g^k mod p) mod q
  • s = [k^-1(Hash(M)+x*r)] mod q

Verifieng

  • V = [(g^u1 * y^u2)mod p] mod q
  • u1 = [Hash(M) w] mod q
  • w = s^-1 mod q
  • u2 = r*w mod q

Comparasion

  • if r == V -> True

Inputs and Outputs

Inputs

  • Sent message
  • Recieved message

Outputs

  • All variables that calculated above

Requirment

  • pip install gmpy2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages