From: Paul Wolneykien <manowar@altlinux.org> To: oss-gost-crypto@lists.altlinux.org Subject: Re: [oss-gost-crypto] Fwd: enc_algo_table Date: Thu, 15 Nov 2018 14:44:32 +0300 Message-ID: <a2ea5753-63cb-02fa-0242-80504ed6a00d@altlinux.org> (raw) In-Reply-To: <CADqLbzKw4Omfav0K2UjRmNDcLS6Yu0tB5A-ia_E6p7RCAP20aQ@mail.gmail.com> [-- Attachment #1: Type: text/plain, Size: 6339 bytes --] 08.11.2018 05:35, Dmitry Belyavsky пишет: > Привет! > > Да вроде мой engine сейчас генерит актуальный формат, двойной wrap я там > убрал, по стандарту там одинарный. Дим, а не подскажешь, как твой engine попросить использовать ГОСТовый же симметричный шифр? $ openssl smime -engine gost -encrypt -in maja.txt -out maja.txt.openssl -outform DER my_test_gost_cert.pem У меня по этой команде вышло 1.2.840.113549.3.7 des-EDE3-CBC: > SEQUENCE (3 elem) > OBJECT IDENTIFIER 1.2.840.113549.1.7.1 data (PKCS #7) > SEQUENCE (2 elem) > OBJECT IDENTIFIER 1.2.840.113549.3.7 des-EDE3-CBC (RSADSI encryptionAlgorithm) > OCTET STRING (8 byte) 17F99179E9B8901B > [0] (944 byte) 80D862ABAC7FEA7CA65BEFBD54BB7926C92CA5F9B3A817F770AD601EBDDADDD63CA2D… > On Thu, Nov 8, 2018 at 12:17 AM Dmitry Eremin-Solenikov > <dbaryshkov@gmail.com <mailto:dbaryshkov@gmail.com>> wrote: > > Привет, > > вт, 6 нояб. 2018 г. в 19:15, Dmitry Belyavsky <beldmit@gmail.com > <mailto:beldmit@gmail.com>>: > > Блин, надо как-то разумно поступить с криптокомовскими тестами, > там всё это генерится. > > Спасибо. Скажи, пожалуйста, а кто генерирует приватные ключи без > упаковки в OCTET > STRING? > > Вообще, надо бы сделать набор тестовых файлов с объяснениями. Я > начинал делать > на основе RFC и проектов ТК26, но дальше дело не пошло. > > > On Tue, Nov 6, 2018 at 7:08 PM Dmitry Eremin-Solenikov > <dbaryshkov@gmail.com <mailto:dbaryshkov@gmail.com>> wrote: > >> > >> Привет, > >> > >> вт, 6 нояб. 2018 г. в 19:06, Dmitry Belyavsky <beldmit@gmail.com > <mailto:beldmit@gmail.com>>: > >> > > >> > Я видел. Прислать? > >> > >> Можно pull-request'ом на https://github.com/GostCrypt/samples > >> > >> > > >> > On Tue, Nov 6, 2018 at 7:04 PM Paul Wolneykien > <manowar@altlinux.org <mailto:manowar@altlinux.org>> wrote: > >> >> > >> >> 06.11.2018 19:03, Dmitry Belyavsky пишет: > >> >> > Привет! > >> >> > > >> >> > Это вообще о чём? > >> >> > > >> >> > Если о том, о чём думаю, то там эфемерный открытый ключ > отправителя, > >> >> > зашифрованный на общем ключе с получателем симметричный ключ > и его > >> >> > имитовставка. > >> >> > >> >> Угу. Кто-нибудь видел такой CMS живьём? > >> >> > >> >> > > >> >> > On Tue, Nov 6, 2018 at 3:40 PM Dmitry Eremin-Solenikov > >> >> > <dbaryshkov@gmail.com <mailto:dbaryshkov@gmail.com> > <mailto:dbaryshkov@gmail.com <mailto:dbaryshkov@gmail.com>>> wrote: > >> >> > > >> >> > Привет, > >> >> > вт, 6 нояб. 2018 г. в 15:32, Paul Wolneykien > <manowar@altlinux.org <mailto:manowar@altlinux.org> > >> >> > <mailto:manowar@altlinux.org > <mailto:manowar@altlinux.org>>>: > >> >> > > >> >> > > Привет! Насколько я понимаю, вот здесь ты добавил > описание парсера > >> >> > > параметров зашифрованного сообщения из DER: > >> >> > > > >> >> > > > diff --git a/src/keyinfo.c b/src/keyinfo.c > >> >> > > > index 544041c..32b184e 100644 > >> >> > > > --- a/src/keyinfo.c > >> >> > > > +++ b/src/keyinfo.c > >> >> > > > @@ -300,6 +300,10 @@ static const struct algo_table_s > >> >> > enc_algo_table[] = { > >> >> > > > "1.2.840.113549.1.1.1", /* rsaEncryption > (RSAES-PKCA1-v1.5) */ > >> >> > > > "\x2A\x86\x48\x86\xF7\x0D\x01\x01\x01", 9, > >> >> > > > 1, PKALGO_RSA, "rsa", "a", "\x82" }, > >> >> > > > + { /* > iso.member-body.ru.rans.cryptopro.gostR3410-2001 */ > >> >> > > > + "1.2.643.2.2.19", > >> >> > > > + "\x2a\x85\x03\x02\x02\x13", 6, > >> >> > > > + 1, PKALGO_GOST, "gost", "--ab-c--d-CD-ef", > >> >> > "\x30\x30\x04\x04\xa0\x06\xa0\x3 > >> >> > > > {NULL} > >> >> > > > }; > >> >> > > > >> >> > > > >> >> > > https://github.com/GostCrypt/libksba/blob/merge-info/src/keyinfo.c#L306 > >> >> > > > >> >> > > Но там же, по идее, только публичный ключ + > зашифрованный KEK + UKM. > >> >> > > Откуда такой сложный формат (--ab-c--d-CD-ef) и почему > он такой? > >> >> > > >> >> > По-моему, эта часть у меня полностью так и не заработала. > >> >> > Надо выкидывать libksba и писать совместимую библиотеку, > но с нормальным > >> >> > парсером внутри. > >> >> > > >> >> > А формат сложный ровно из-за наличия публичного ключа > (a,b) с > >> >> > параметрами (C, D) > >> >> > и прочим. > > -- > With best wishes > Dmitry > _______________________________________________ > oss-gost-crypto mailing list > oss-gost-crypto@lists.altlinux.org > <mailto:oss-gost-crypto@lists.altlinux.org> > https://lists.altlinux.org/mailman/listinfo/oss-gost-crypto > > > > -- > SY, Dmitry Belyavsky > > > _______________________________________________ > oss-gost-crypto mailing list > oss-gost-crypto@lists.altlinux.org > https://lists.altlinux.org/mailman/listinfo/oss-gost-crypto > [-- Attachment #2: my_test_gost_cert.pem --] [-- Type: application/x-x509-ca-cert, Size: 745 bytes --] [-- Attachment #3: maja.txt.openssl --] [-- Type: application/octet-stream, Size: 1320 bytes --]
next prev parent reply other threads:[~2018-11-15 11:44 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-11-06 12:32 ` Paul Wolneykien 2018-11-06 12:40 ` Dmitry Eremin-Solenikov 2018-11-06 16:04 ` Paul Wolneykien 2018-11-06 16:07 ` Paul Wolneykien 2018-11-06 16:08 ` Dmitry Eremin-Solenikov 2018-11-07 17:13 ` Paul Wolneykien 2018-11-07 21:16 ` Dmitry Eremin-Solenikov 2018-11-08 8:11 ` Dmitry Eremin-Solenikov 2018-11-14 12:50 ` Dmitry Eremin-Solenikov 2018-11-14 16:05 ` Dmitry Eremin-Solenikov 2018-11-15 9:06 ` Dmitry Eremin-Solenikov 2018-11-15 11:44 ` Paul Wolneykien [this message] 2018-11-15 11:50 ` Paul Wolneykien
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=a2ea5753-63cb-02fa-0242-80504ed6a00d@altlinux.org \ --to=manowar@altlinux.org \ --cc=oss-gost-crypto@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Open-source aspects of GOST Cryptography This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/oss-gost-crypto/0 oss-gost-crypto/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 oss-gost-crypto oss-gost-crypto/ http://lore.altlinux.org/oss-gost-crypto \ oss-gost-crypto@lists.altlinux.org oss-gost-crypto@lists.altlinux.ru oss-gost-crypto@lists.altlinux.com public-inbox-index oss-gost-crypto Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.oss-gost-crypto AGPL code for this site: git clone https://public-inbox.org/public-inbox.git