IBM Crypto Education Community

  • 1.  what's ccsid of encryption

    Posted Thu August 29, 2024 02:06 PM

    Hi everyone,

    I created a clear key using the triple-des algorithm for with type(data) and a decimal (19,0)  field that I want to encrypt. I'm using csnbenc with the rule array "cusp." I developed a stored procedure in COBOL to insert the encrypted field into a table with EBCDIC CCSID. Now, when I attempt to decrypt it with csnbdec, I cannot retrieve my clear field (although it works with Unicode). Is there a way to store the encryption of the fieldPost in a table with EBCDIC CCSID and then decrypt it? One option is to convert it to hexadecimal, but I'm unsure how to proceed with that.



    ------------------------------
    Morteza Moradi
    ------------------------------


  • 2.  RE: what's ccsid of encryption

    Posted Thu August 29, 2024 02:12 PM

    Encryption uses raw bits. The data being encrypted has no encoding that ICSF applies. So, if you encrypt something that was encoded in CCSID 1047, ICSF just sees it as the raw underlying bytes.

    For example, if you encrypt "ABC" in CCSID 1047, you are actually encrypting C1C2C3 (ICSF has no idea it was EBCDIC).

    If you are storing encrypted data in a table, it would be a "Binary string" or "Large object" (LOB), depending on how long it is.



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