Skip to content

Conversation

@DibranMulder
Copy link

Dutch Passports have a AES256 bit key length. The assumption that the block size which is always 16 bytes (128 bits) with AES is also the key length is simply incorrect. This PR fixes #31 on your side but sadly the same issue is made in Pointy Castle.

These are the errors people often encounter.

I/flutter ( 4922): pace FINE: 2025-07-09 14:13:43.293789: Cipher algorithm: AES, Key length: 256 bits
.
.
.
I/flutter ( 7239): pace SEVERE: 2025-07-09 10:25:13.240112: PACE.decryptNonce; Failed: AESCipher.decrypt; AES128 key length must be 128 bits.
I/flutter ( 7239): pace SEVERE: 2025-07-09 10:25:13.240874: PACE(1); Failed: PACE.decryptNonce; Failed: AESCipher.decrypt; AES128 key length must be 128 bits.
I/flutter ( 7239): pace SEVERE: 2025-07-09 10:25:13.241833: PACE key establishment failed: PACE(1); Failed: PACE.decryptNonce; Failed: AESCipher.decrypt; AES128 key length must be 128 bits.
I/flutter ( 7239): mrtdeg.app SEVERE: 2025-07-09 10:25:13.243160: An exception was encountered while trying to read Passport: PACE key establishment failed: PACE(1); Failed: PACE.decryptNonce; Failed: AESCipher.decrypt; AES128 key length must be 128 bits.

@smlu
Copy link
Member

smlu commented Jul 25, 2025

Thank you for providing this PR!
Could you please re-base it to develop branch.

@smlu smlu self-assigned this Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AESCipher decrypt error

2 participants