Manual/OpenSSL

[OpenSSL] EdDSA ์•Œ๊ณ ๋ฆฌ์ฆ˜ Ed25519 Ed448 ํ‚ค ์ƒ์„ฑ

JayKim๐Ÿ™‚ 2023. 6. 14. 10:40

EdDSA ( Edwards-Curve Digital Signature Algorithm ) ์˜ ์•ฝ์ž๋กœ ECC ์ฒ˜๋Ÿผ ๋””์ง€ํ„ธ ์„œ๋ช…์šฉ ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด๋‹ค.
ECDSA์— ๋น„ํ•˜๋ฉด ์—ฐ์‚ฐ ์†๋„๊ฐ€ ECDSA ๋ณด๋‹ค๋Š” ์กฐ๊ธˆ ๋น ๋ฅธ ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด๋‹ค.

ํ˜„์žฌ EdDSA ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ ECDSA ๋ณด๋‹ค๋Š” ๋„๋ฆฌ ์‚ฌ์šฉ๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ ์  ๋Š˜์–ด๋‚˜๊ณ  ์žˆ๋‹ค๊ณ  ํ•œ๋‹ค.
EdDSA ์—์„œ ์ฃผ๋กœ ์‚ฌ์šฉํ•˜๋Š” Curve ๊ฐ€ Ed25519 ์™€ Ed448 ์ด๋‹ค.

๊ทธ๋Ÿผ OpenSSL ๋ช…๋ น์–ด๋กœ ed25519์™€ ed448 ํ‚ค ์Œ์„ ๋งŒ๋“ค์–ด ๋ณด์ž.

ed25519 ๊ฐœ์ธํ‚ค ์ƒ์„ฑ

openssl genpkey -algorithm ed25519 -out private.pem

ed25519 ๊ฐœ์ธํ‚ค ๊ฒฐ๊ณผ

-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIJ3Khy9FYLkzKEa1B6IEnjvJnTPE4Njn+ArGs9nRAlZ/
-----END PRIVATE KEY-----

ed25519 ๊ฐœ์ธํ‚ค์—์„œ ๊ณต๊ฐœํ‚ค ์ถ”์ถœ

openssl pkey -in private.pem -pubout -out public.pem

ed25519 ๊ณต๊ฐœํ‚ค ๊ฒฐ๊ณผ

-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAqUQXEpZTdIo6jgt1uZdiYfk4Zszx/UDr/1oUe4vTxwY=
-----END PUBLIC KEY-----

ed448 ๊ฐœ์ธํ‚ค ์ƒ์„ฑ

openssl genpkey -algorithm ed448 -out ec448_private.pem

ed448 ๊ฐœ์ธํ‚ค ๊ฒฐ๊ณผ

-----BEGIN PRIVATE KEY-----
MEcCAQAwBQYDK2VxBDsEOS4F29VxeSsz/ZQk/cMQLvONXy/Mu1h1qixRP0ngrpJS
MN/oMIga8Xcz3zPQrwHoi2E83QoRxfYerg==
-----END PRIVATE KEY-----

ed448 ๊ฐœ์ธํ‚ค์—์„œ ๊ณต๊ฐœํ‚ค ์ถ”์ถœ

openssl pkey -in ed448_private.pem -pubout -out ed448_public.pem

ed448 ๊ณต๊ฐœํ‚ค ๊ฒฐ๊ณผ

-----BEGIN PUBLIC KEY-----
MEMwBQYDK2VxAzoAyPCvZEIBjIVLPI6eBUiI0KBMA/6TOKNyhJ14h7v2AQ9LmqqZ
IOT1rVlvvvTMQ1OThIkT2tzsmHuA
-----END PUBLIC KEY-----