I need to provide a service that acts as a symetric encryption/decryption blackbox :

  • the box get a secret key k
  • users send datas d, and get ciphertext c = Encrypt(d,k)
  • users send ciphertext c, and get data d = Decrypt(c,k)
  • the box should encrypt/decrypt only from/to an authorized set of users
  • users should never get the key k

I am having a little trouble identifying what could be holes in my service. As far as I understand, I need crypto that resist the following attacks :

  • Choosen Ciphertext Attack
  • Choosen Cleartext Attack
  • Know plaintext attack

On a technical view, encryption/decryption is done using AES, which is believed to resist to the said attack. With an HMAC, I should able to refuse requests coming from unauthorized users.

Is it true that ;

  • a user will not be able to find the key despites the fact he can encrypt/decrypt any amount of data (since AES is strong)
  • user1 can encrypt data, user2 can get them (steal), and now user2 can decrypt the data of user1 using the oracle
  • since I provide an oracle, I have little concerns of timing attacks and padding attacks

What are the risk, attacks and holes I am missing in this scheme ?

  • Will you actually have cleartext (aka header / associated data), as opposed to just plaintext? – user49075 Jun 24 '15 at 11:49
  • I am not sure what your are talking about. In my current implementation, users send only the data they want to be encrypted, with no type of authentification. – calve Jun 24 '15 at 13:15
  • So, you'll have plaintext but no cleartext. – user49075 Jun 24 '15 at 13:20
  • Don't forget replay attacks, don't allow reuse of requests – Natanael Jun 25 '15 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.