GOST 28147-89 CFB && padding issue

Nikolay Shaplov <[email protected]>
Newsgroups gmane.text.xml.xmlsec
Message-ID <1596632.rKVPhYWIem@home>
I've succsessuflly implemented GOST 28147-89 symmetric transform. You can see 
alpha version of a patch.

I think i will add cfb suffix to all transform names, as gost98 works by default 
in cfb mode. And this mode is recommended. (cbc even has only custom 
implementation as it is out of standard)

I also met an issue I'd like to discuss...

cfb mode do not need padding. And for AES and DES encryption some strange 
efforts are made in openssl/ciphers.c in functions

xmlSecOpenSSLEvpBlockCipherCtxUpdate
xmlSecOpenSSLEvpBlockCipherCtxFinal

So I've wrapped all padding code in 

if ((xmlSecKeyDataId*) ctx->keyId != (xmlSecKeyDataId*) 
xmlSecOpenSSLKeyDataGost28147_89Id)

and everything work well now.

I am not sure that it is the best way to do the trick... 
If this way is good enough I will indent code in proper way there. If not, 
tell me what way to use...

_______________________________________________
xmlsec mailing list
[email protected]
http://www.aleksey.com/mailman/listinfo/xmlsec
signature.asc (application/pgp-signature, 473 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAABAgAGBQJU/0JcAAoJEKc13HowK+H4o+YIAIP2EuAho+5o8qZMXq3zFEEj
uoLn7VSpsGqKwpApLs/Y0vL4ZzbyZ1byTjQipUGNm+33lMQrbpejEg0864kgVyjd
xNI5RWLPmAzLXIx8TU76P51d8hkjzXReaZskLOiKC0BKcZqhhP0+RE5H2MtBkT77
GaS33UUkB8kkUBTfYoOKHiXS3wB6/3VIXGrfjDwF1dbzVbwKTz5Of+AVsKuOO+ci
sTNAKceSj2Oq08S+boNxDGYRNxzmPrAqjvxTYwOZ07/IJP7hrAPEQE1sLyGoHUWo
V1x3dbQWFAEh2CJxkhdp32yto5xY3waBrKc07NyqUwRH/95BE+KQGTk3JjTpjjo=
=y3VX
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.