Opened 13 years ago

Last modified 12 years ago

#162 accepted defect

crypto incompatibilities between pycrypto and bouncycastle

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 0.12
Component: Android Keywords:
Cc:

Description (last modified by Antoine Martin)

There are at least two things that need addressing:

  • verify_key(...) sometimes fails and therefore the identity of the server is rejected, not sure why this is intermittent
  • When decrypting encrypted messages:
    org.bouncycastle.crypto.DataLengthException: input too large for RSA cipher.
    

I am still a bit puzzled as to why pycrypto manages to decrypt such blocks and BouncyCastle does not. Either we fix the data length using a specific padding scheme (as the length of the input looks fine as it is: <100bytes with 4096bit keys is ok), or we use a symmetric cipher for all encrypted packets (and exchange it during the login phase).

More info on this issue: Too much data for RSA block fail

See also #158

Change History (5)

comment:1 Changed 13 years ago by Antoine Martin

Description: modified (diff)
Status: newaccepted

comment:2 Changed 13 years ago by Antoine Martin

Description: modified (diff)

comment:3 Changed 12 years ago by Antoine Martin

Description: modified (diff)

comment:4 Changed 12 years ago by Antoine Martin

Description: modified (diff)

comment:5 Changed 12 years ago by Antoine Martin

verify_key is fixed in r4820: fix byte array size properly (not making assumptions)

Note: See TracTickets for help on using tickets.