PKI/Cryptography 14

PKCS#5 ์™€ PKCS#7 ํŒจ๋”ฉ ๋ฐฉ๋ฒ•

ํŒจ๋”ฉ์—๋Š” ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๋ฐฉ์‹์ด ์žˆ์ง€๋งŒ ์ฃผ๋กœ ๋Œ€์นญํ‚ค ์•”ํ˜ธํ™”์— ์‚ฌ์šฉ ๋˜๋Š” ํŒจ๋”ฉ ๋ฐฉ์‹์ด PKCS#7 ๋ฐฉ์‹์ด๋‹ค. PKCS#7 ์€ RFC 5652 ์„ ์ฐธ์กฐ ํ•˜๋ฉด ๋œ๋‹ค. ๋Œ€์นญํ‚ค ์•”ํ˜ธ๋Š” ์›๋ฌธ์„ ๋ธ”๋ก ๋‹จ์œ„๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•œ๋‹ค. ํ•˜์ง€๋งŒ ์›๋ฌธ ์‚ฌ์ด์ฆˆ๊ฐ€ ๋ธ”๋ก ์‚ฌ์ด์ฆˆ ๋ณด๋‹ค ์ž‘์„ ์‹œ ๋ธ”๋ก ์‚ฌ์ด์ฆˆ๋ฅผ ๋งŒ๋“ค์–ด ์ฃผ๊ธฐ ์œ„ํ•ด ํŒจ๋”ฉ์„ ํ•ด์•ผ ํ•œ๋‹ค. ์ด๋•Œ ์ฃผ๋กœ ์‚ฌ์šฉํ•˜๋Š” ํŒจ๋”ฉ ๋ฐฉ๋ฒ•์ด PKCS#7 ์— ๋‚˜์˜ค๋Š” ๋ฐฉ์‹์ด๋‹ค. * ํŒจ๋”ฉ์— ์‚ฌ์šฉํ•˜๋Š” ๊ฐ’์€ ์ถ”๊ฐ€ ๋˜๋Š” ํŒจ๋”ฉ์˜ ์ˆ˜๊ฐ€ ์ž…๋ ฅ ๋œ๋‹ค. N ๋ฐ”์ดํŠธ์˜ ํŒจ๋”ฉ์„ ํ•˜๋ ค๋ฉด N๋ฐ”์ดํŠธ์˜ ๊ฐ’์ด N๋ฒˆ ์ถ”๊ฐ€ ํ•œ๋‹ค. ํŒจ๋”ฉ์€ ๋‹ค์Œ์˜ ๊ฐ’ ์ฒ˜๋Ÿผ ๋œ๋‹ค. 01 ( 1byte ํŒจ๋”ฉ ) 02 02 ( 2byte ํŒจ๋”ฉ ) 03 03 03 ( 3byte ํŒจ๋”ฉ ) 04 04 04 04 05 05 05 05 05 06 06 06 06 06 06 etc...

PKI/Cryptography 2022.12.13

ECIES ์•Œ๊ณ ๋ฆฌ์ฆ˜

* ECIES(Elliptic Curve Integreated Encryption Scheme) : ํ†ตํ•ฉ ์•”ํ˜ธํ™” ๋ฐฉ์‹(Public Key๋กœ ์•”ํ˜ธํ™”ํ•˜๊ณ  Private Key๋กœ ๋ณตํ˜ธํ™”) ECIES ๋Š” ECC ํ‚ค๋ฅผ ์‚ฌ์šฉํ•ด ECDH ๋ฅผ ์ด์šฉํ•˜์—ฌ ํ‚ค ๊ตํ™˜ ํ›„ ๋Œ€์นญํ‚ค ์•”ํ˜ธํ™”๋ฅผ ํ•˜๋Š”๊ฒƒ์ด๋‹ค. Receiver loads the EC key (public/private/curve) Receiver sends its public key and curve to the Transmitter Transmitter generates a new ephemeral EC key on the curve Transmitter generates the shared symmetric key Transmitter encrypts the data..

PKI/Cryptography 2022.12.09

RSA ์•Œ๊ณ ๋ฆฌ์ฆ˜

RSA ์„ค๋ช… youtube ์˜์ƒ https://www.youtube.com/watch?v=kGUlfVpIfaQ PKI ๊ด€๋ จ ๊ฐœ๋ฐœ ํ•˜๋ฉด์„œ ์ˆ˜ํ•™์ด ํ•ญ์ƒ ์–ด๋ ค์› ๋Š”๋ฐ ๊ทธ๋ž˜๋„ ์ด ์œ ํŠœ๋ธŒ ์˜์ƒ์ด RSA ์— ์‚ฌ์šฉ๋˜๋Š” ์ˆ˜ํ•™์„ ์‰ฝ๊ฒŒ ์ž˜ ์„ค๋ช…์„ ํ•ด์ฃผ๋„ค์š”. RSA ์œ„ํ‚ค ํŽ˜์ด์ง€ https://ko.wikipedia.org/wiki/RSA_%EC%95%94%ED%98%B8 RSA ์•”ํ˜ธ - ์œ„ํ‚ค๋ฐฑ๊ณผ, ์šฐ๋ฆฌ ๋ชจ๋‘์˜ ๋ฐฑ๊ณผ์‚ฌ์ „ ์œ„ํ‚ค๋ฐฑ๊ณผ, ์šฐ๋ฆฌ ๋ชจ๋‘์˜ ๋ฐฑ๊ณผ์‚ฌ์ „. RSA[1] ์•”ํ˜ธ๋Š” ๊ณต๊ฐœํ‚ค ์•”ํ˜ธ์‹œ์Šคํ…œ์˜ ํ•˜๋‚˜๋กœ, ์•”ํ˜ธํ™”๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ์ „์ž์„œ๋ช…์ด ๊ฐ€๋Šฅํ•œ ์ตœ์ดˆ์˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜์œผ๋กœ ์•Œ๋ ค์ ธ ์žˆ๋‹ค. RSA๊ฐ€ ๊ฐ–๋Š” ์ „์ž์„œ๋ช… ๊ธฐ๋Šฅ์€ ์ธ์ฆ์„ ์š”๊ตฌ ko.wikipedia.org

PKI/Cryptography 2022.12.08

SM2 SM3 SM4 ์•Œ๊ณ ๋ฆฌ์ฆ˜

* SM2, SM3 ๊ทธ๋ฆฌ๊ณ  SM4 ๋Š” ์ค‘๊ตญ ์•”ํ˜ธ ํ‘œ์ค€ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์ด๋‹ค. ์—ฌ๊ธฐ๋Š” SM์€ ShangMi ๋ฅผ ๋‚˜ํƒ€๋‚ธ๋‹ค. * SM2 ๋Š” Elliptic Curve Cryptography (ECC) ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•œ ์ „์ž ์„œ๋ช… ๋ฐ ๊ฒ€์ฆ์„ ์œ„ํ•œ ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด๋‹ค. * SM3๋Š” ํ•ด์‰ฌ ์•Œ๊ณ ๋ฆฌ์ฆ˜ * SM4 ๋Š” ์•”/๋ณตํ˜ธํ™”๋ฅผ ์œ„ํ•œ ๋ธ”๋ก ์‚ฌ์ดํผ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์ด๋‹ค. ์ฐธ๊ณ ) ๊ฐœ์ธ์ ์œผ๋กœ ์•”ํ˜ธํ™”์— ๋Œ€ํ•œ ์ˆ˜ํ•™์  ์ดํ•ด๋Š” ์–ด๋ ต๊ตฌ ๋‹จ์ง€ ๊ด€๋ จ ์•Œ๊ณ ๋ฆฌ์ฆ˜์— ๋Œ€ํ•œ ํŠน์„ฑ๋งŒ ์„ค๋ช…ํ•œ๋‹ค. SM3 * SM3์˜ ๊ฒฝ์šฐ 32๋ฐ”์ดํŠธ์˜ ๊ธธ์ด์˜ ๊ฒฐ๊ณผ ๊ฐ’์„ ๋ณด์—ฌ์ค€๋‹ค. SM4 * SM4 ์˜ ๊ฒฝ์šฐ ๋Œ€์นญํ‚ค ์•”ํ˜ธํ™”์ด๋ฉด ์ด๋•Œ ์‚ฌ์šฉํ•˜๋Š” SM4์šฉ ํ‚ค ๊ธธ์ด๋Š” 16๋ฐ”์ดํŠธ๋กœ ๊ณ ์ •์ด๋ฉฐ IV ๋ฐ ์šด์˜ ๋ชจ๋“œ๋Š” ๋ชจ๋‘ ๋™์ผํ•œ๋‹ค. SM2 * SM2 ์˜ ๊ฒฝ์šฐ ์ „์ž ์„œ๋ช…์šฉ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์ด๋ฉฐ ์ด๋•Œ ์‚ฌ์šฉํ•˜๋Š” ํ•ด์‰ฌ๋Š” S..

PKI/Cryptography 2022.12.06
๋ฐ˜์‘ํ˜•