Skip to content

3to5thpower/elgamalECC

Repository files navigation

elgamalECC

Haskell

The Practice Implementation of EC Elgamal Encryption.

Requirements

Usage

Clone this Repository and execute stack run to run the application.

$ stack run
# First, this app displays detailed information about keys and elliptic curves.
位数は99971です。
今回の秘密鍵は 9193, 公開鍵は(9757, 48359), 楕円曲線が y^2 = x^3 + 8254x + 3760, 生成元Gは(4108, 3619)です。
# Input any string
暗号化したい文字列を入力してください。
>>> hello
# Then, the encryption result and its decryption result are displayed.
暗号化結果は[((38725, 8015),(24936, 44767)),((38725, 8015),(77809, 58732)),((38725, 8015),(67936, 46681))]です。
復号化結果は"hello"です。

I defined Finite field at the type level so the order p cannnot be changed at runtime.
If you want to change the order p from 99971, please rewrite the line 9 and 10 of src/Data.hs.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published