Java Card DES generator applet output is different from online-tools output

前端 未结 2 928
一生所求
一生所求 2020-12-17 05:35

The below applet is written to do a DES encryption/Decryption on the APDU data field :

package cryptoPack;

import javacard.framework.APDU;
import javacard.f         


        
2条回答
  •  北荒
    北荒 (楼主)
    2020-12-17 06:22

    As I didn't know which one of DES_ECB_PKCS5, DES_ECB_NOPAD, DES_ECB_ISO9797_M2 or DES_ECB_ISO9797_M1 being used by the online tool

    That´s the problem. Blockmode, padding and other things are very important (and there are so much more than 4 combinations). And in case of online tools, charset stuff (input interpretation in general) is also a problem.

    Without knowing the online tool in detail, you won´t get anything right with it.
    Just don´t use it and search for standardized test vectors.

    Other than that, why you´re using DES!? Stop that.
    It´s not secure anymore.

提交回复
热议问题