IBM Crypto Education Community

  • 1.  Other DES data encryption other than ENC?

    Posted 15 days ago

    Hello.   I find myself looking to create a KCVfor a DES key.   I have code using ENC to create one for me.  It seems to require CBC and will not allow EBC.   And I'm wondering if using EBC would give me a different KCV result.   To that end, I've been looking for a data encryption call that would allow me to create KCV using EBC.  I can't find one in the application programmers guide.

    Would anyone else have ideas that would point me into a direction to accomplish this goal?

    Does anyone already know the CBC or EBC does not matter when generating a KCV?

    Your feedback to get me started on a solution for this would be appreciated.

    Sincerely,

    Mark Vollmer



    ------------------------------
    Mark Vollmer
    Developer, but does everything.
    CV Systems, LLC
    ------------------------------


  • 2.  RE: Other DES data encryption other than ENC?

    Posted 15 days ago

    It usually doesn't matter for most kinds of KCVs. You might want to use CSNBKYT to generate key test values instead. CSNBENC will only work for data-encryption keys that are allowed to do encryption and will fail for keys like PINGEN, etc.



    ------------------------------
    Eric Rossman
    ------------------------------



  • 3.  RE: Other DES data encryption other than ENC?

    Posted 12 days ago

    Eric,

    Thanks for helping out.   Is it  your belief that I can use ENC-ZERO in this BKYT call and an encrypted import/export key to create a KCV that was performed using ECB?

    Sincerely,

    Mark Vollmer



    ------------------------------
    Mark Vollmer
    Developer, but does everything.
    CV Systems, LLC
    ------------------------------



  • 4.  RE: Other DES data encryption other than ENC?

    Posted 11 days ago

    Yes, that will work.

    I just tried it with a 16-byte DES key using both ECB and CBC (with an all zero IV) modes and got the same first 4 bytes as returned from CSNBKYT using rules 'KEY-ENCDGENERATEENC-ZERO'



    ------------------------------
    Eric Rossman
    ------------------------------



  • 5.  RE: Other DES data encryption other than ENC?

    Posted 11 days ago

    Eric,

    I can't thank you enough.   I too was able to perform the comparison and got the same KCV results. 

    Thanks very much.

    Sincerely,

    Mark Vollmer



    ------------------------------
    Mark Vollmer
    Developer, but does everything.
    CV Systems, LLC
    ------------------------------



  • 6.  RE: Other DES data encryption other than ENC?

    Posted 10 days ago

    I'm so glad to hear that you were successful. I'm happy to help!



    ------------------------------
    Eric Rossman
    ------------------------------