[xmlsec] Trying to implement GOST 28147-89 cipher. Need help

Nikolay Shaplov dhyan at nataraj.su
Thu Mar 5 00:00:41 PST 2015


On Wednesday 04 March 2015 10:48:43 Aleksey Sanin wrote:
> The error message indicates that the correct key can not be found
> which is probably due to mismatch in expected keyId. Set a breakpoint
> in xmlSecKeyReqMatchKeyValue() and check what's going on.

Sadly its wrong guess...

In both cases (aes that works well and gost that does not work) it came to  
xmlSecKeyReqMatchKeyValue with same data

keyReq = {
  keyId = 0x0, 
  keyType = 65535, 
  keyUsage = 1048575, 
  keyBitsSize = 0, 
  keyUseWithList = {
    id = 0xb7e42ff8, 
    data = 0x0, 
    use = 0, 
    max = 0, 
    allocMode = xmlSecAllocModeDouble
  }, 
  reserved1 = 0x0, 
  reserved2 = 0x0
}
value = {
  id = 0xb7c0d500, 
  reserved0 = 0x0, 
  reserved1 = 0x0
}

and since both keyId and keyBitSize are 0, no all ifs are skipped and it just 
returns 1. (I've checked: set breakpoint on that line and that line is reached 
several times in both cases).

Difference is somewhere else. Will try to find it from that point...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://www.aleksey.com/pipermail/xmlsec/attachments/20150305/270c7bc3/attachment.sig>


More information about the xmlsec mailing list