Parity errors

Oct 4, 2009 at 6:42 PM
Edited Oct 4, 2009 at 7:51 PM

Hello,

 

I'm getting a parity error when converting a ZEK from ZMK to LMK encryption and have no idea why. Here's the code. Error 11 is always returned in the zekLmk variable. Any ideas?

 

        Dim zmk As String
        Dim zek As String
        Dim zekLmk As String
        zmk = TestTran("0000U", New GenerateKey_A0).Substring(2, 33)
        zek = TestTran("0" + zmk + ";UU1", New GenerateZEKorZAK_FI).Substring(2, 33)
        zekLmk = TestTran("0" + zmk + zek + ";UU1", New TranslateZEKORZAKFromZMKToLMK_FK)

 

Thanks,

Rob

Oct 6, 2009 at 7:25 PM

There was a big logic error in TranslateFromKeyToLMK class, which is responsible for translating a lot of things from ZPK to LMk encryption. My fault the unit tests didn't catch that, most are centered around translation of single-length keys.

I've made a temporary fix which you can download from the list of downloadable commits, change set 31451 - please download that code set and let me know if it fixes your problem so I can pack it in a subsequent release.

Thanks for spotting that. You could have picked up the encrypted ZEK from the FI function but by cross-referencing the result from the FK function the bug became evident.

Oct 7, 2009 at 9:37 PM

Yes, the bug is fixed. Thanks very much, this library is a very nice piece of work.

Rob