boltlabs-inc / key-mgmt-spec

Formal specification for the key management project
MIT License
3 stars 2 forks source link

Add validation of key id in generate-and-store #83

Closed marsella closed 2 years ago

marsella commented 2 years ago

Right now the client goes to the key server to get a key id, then generates a key and sends it to the key server to store. There's not currently a step where the key server makes sure that the ciphertext they send is associated with the same key id it produced.

I think this should be explicit in 4.i.

indomitableSwan commented 2 years ago

The server has selected the key_id and should be storing the association between the key_id and the ciphertext received in Step 3.ii in their database already. This is why the client doesn't send the key_id to the server in Step 3.ii.

That is, there is nothing for the server to check here. The server does not know the key used to encrypt the ciphertext send in Step 3.ii, so would be unable to check any associated data the client were to send, anyway.

The bug that I see is that we should make storage of the association between the received ciphertext and key_id explicit in Step 4.ii.

Does this make sense to you, @marsella?

marsella commented 2 years ago

Ah, yes it does make sense. Thanks for clarifying.