FAQ Database Discussion Community


Why my smart card accepts two different keys as its MAC key?

smartcard,javacard,3des,parity,globalplatform
As you see below, I tried to list installed applets on my card using gp -list. I specify some different key: GP: gp -mac 404142434445464748494A4B4C4D4E4F -list AID: A000000151000000 (|....Q...|) ISD OP_READY: Security Domain, Card lock, Card terminate, Default selected, CVM (PIN) management AID: A0000001515350 (|....QSP|) ExM LOADED: (none) A000000151535041 (|....QSPA|)...

iOS 3DES with ECB return half correct data

ios,swift,encryption,3des,tripledes
Got a problem with crypting password with 3DES + ECB algo. Here is the code I using: class func encryptPassword(pass: String) -> String { let keyString = "123456789012345678901234" let keyData: NSData! = (keyString as NSString).dataUsingEncoding(NSUTF8StringEncoding) as NSData! let keyBytes = UnsafePointer<UInt8>(keyData.bytes) let data: NSData! = (pass as NSString).dataUsingEncoding(NSUTF8StringEncoding) as NSData!...

Java's 3DES encryption generates trash at the end of encrypted data

java,encryption,3des
I have a 3des Cipher object that is initialized like this: KeySpec keySpec= new DESedeKeySpec(bytesKey); SecretKeyFactory secretKeyFactory = SecretKeyFactory.getInstance("DESede"); SecretKey secretKey= secretKeyFactory.generateSecret(keySpec); Cipher cipher = Cipher.getInstance("DESede"); cipher.init(modo, secretKey); When this object is used to encrypt data, no exception is thrown and the algorithm ends succesfully: String unencryptedText = "192 character...