PATCH: SEED cipher support
Hello,
Here I propose a patch for linux crypto API to add a support SEED (RFC4269). This patch was generated against git-HEAD as of today. This patch have been used in few VPN appliance vendors in Korea for several years. And it was verified by KISA, who developed the algorithm itself.
As its importance in Korean banking industry, it would be great if linux incorporates the support.
Thanks,
Hye-Shik
Hi.
Quoted 10 lines · Hye-Shik Chang
Hello,
Here I propose a patch for linux crypto API to add a support SEED (RFC4269). This patch was generated against git-HEAD as of today. This patch have been used in few VPN appliance vendors in Korea for several years. And it was verified by KISA, who developed the algorithm itself.
As its importance in Korean banking industry, it would be great if linux incorporates the support.
Besides the only c++ comment in the tcrypt.c this patch looks really good. This is a good submission.
As a side note: please do not send gzipped patches, since it is quite hard to show where the problem in the patch is if any when replying.
Signature · 1 line
Evgeniy Polyakov
Herbert Xu
maintainerQuoted 2 lines · Evgeniy Polyakov
Besides the only c++ comment in the
tcrypt.cthis patch
Those C++ comments are a pre-existing wart :)
I'll make sure that they get killed.
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtHerbert Xu
maintainerQuoted 10 lines · Hye-Shik Chang
Hello,
Here I propose a patch for linux crypto API to add a support SEED (RFC4269). This patch was generated against git-HEAD as of today. This patch have been used in few VPN appliance vendors in Korea for several years. And it was verified by KISA, who developed the algorithm itself.
As its importance in Korean banking industry, it would be great if linux incorporates the support.
Thanks for the patch! Could you please add a Signed-off-by and I'll merge it in.
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtQuoted 9 lines · Herbert Xu
Quoted 8 lines · Hye-Shik Chang
Hello,
Here I propose a patch for linux crypto API to add a support SEED (RFC4269). This patch was generated against git-HEAD as of today. This patch have been used in few VPN appliance vendors in Korea for several years. And it was verified by KISA, who developed the algorithm itself.
Quoted 6 lines
Quoted 2 lines
As its importance in Korean banking industry, it would be great if linux incorporates the support.
Thanks for the patch! Could you please add a Signed-off-by and I'll merge it in.
Thank you for the review!
I have changed the copyright and MODULE_AUTHOR lines by a request of KISA in the following new patch. Please apply it instead.
crypto/Kconfig +14 -0
@@ -412,6 +412,20 @@ config CRYPTO_ANUBIS <https://www.cosic.esat.kuleuven.ac.be/nessie/reports/> <http://planeta.terra.com.br/informatica/paulobarreto/AnubisPage.html> +config CRYPTO_SEED + tristate "SEED cipher algorithm" + select CRYPTO_ALGAPI + help + SEED cipher algorithm (RFC4269). + + SEED is a 128-bit symmetric key block cipher that has been + developed by KISA (Korea Information Security Agency) as a + national standard encryption algorithm of the Republic of Korea. + It is a 16 round block cipher with the key size of 128 bit. + + See also: + <http://www.kisa.or.kr/kisa/seed/jsp/seed_eng.jsp> + config CRYPTO_DEFLATE tristate "Deflate compression algorithm"
crypto/Makefile +1 -0
@@ -45,6 +45,7 @@ obj-$(CONFIG_CRYPTO_ARC4) += arc4.o obj-$(CONFIG_CRYPTO_TEA) += tea.o obj-$(CONFIG_CRYPTO_KHAZAD) += khazad.o obj-$(CONFIG_CRYPTO_ANUBIS) += anubis.o +obj-$(CONFIG_CRYPTO_SEED) += seed.o obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o
crypto/seed.c new file +479 -0
479 lines not on this page · raw message
crypto/tcrypt.c +7 -1
@@ -78,7 +78,7 @@ static char *check[] = {"twofish" ,"serpent" ,"sha384" ,"sha512" ,"md4" ,"aes" ,"cast6" ,"arc4" ,"michael_mic" ,"deflate" ,"crc32c" ,"tea" ,"xtea" ,"khazad" ,"wp512" ,"wp384" ,"wp256" ,"tnepres" ,"xeta" ,"fcrypt" , -"camellia" ,NULL +"camellia" ,"seed" ,NULL };static void hexdump (unsigned char *buf,unsigned int len)
@@ -1029,6 +1029,12 @@ static void do_test(void) camellia_cbc_dec_tv_template, CAMELLIA_CBC_DEC_TEST_VECTORS); +//SEED +test_cipher ("ecb(seed)" ,ENCRYPT , seed_enc_tv_template, +SEED_ENC_TEST_VECTORS ); +test_cipher ("ecb(seed)" ,DECRYPT , seed_dec_tv_template, +SEED_DEC_TEST_VECTORS ); +test_hash ("sha384" , sha384_tv_template,SHA384_TEST_VECTORS );test_hash ("sha512" , sha512_tv_template,SHA512_TEST_VECTORS );test_hash ("wp512" , wp512_tv_template,WP512_TEST_VECTORS );
crypto/tcrypt.h +90 -0
96 lines not on this page · raw message
Herbert Xu
maintainerQuoted 5 lines · Hye-Shik Chang
I have changed the copyright and
MODULE_AUTHORlines by a request of KISA in the following new patch. Please apply it instead.Signed-off-by Hye-Shik Chang <[email protected]>
Patch applied. Thanks a lot!
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt