Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encrypted attributes should be hashed locally before applying HMAC #82

Open
dlongley opened this issue May 1, 2022 · 1 comment
Open

Comments

@dlongley
Copy link
Contributor

dlongley commented May 1, 2022

In our EDV client implementation, we use SHA-256 to hash the encrypted attribute values that will be HMAC'd. We do this additional hashing prior to HMACing to improve privacy and performance; when the HMAC function is implemented via an external KMS system (e.g., WebKMS), the data to be HMAC'd must be sent to that system.

We should update the spec to require EDV clients to do this step before HMACing and provide the above rationale as security/privacy/performance considerations.

@dlongley
Copy link
Contributor Author

dlongley commented May 5, 2022

The process for computing encrypted attributes (aka blind attributes) should be better documented as well. This includes the details of first producing hashed attributes (separately SHA-256 hashing the attribute name and JCS-canonlized value) and then using those hashed attributes to produce both simple and compound hashed attributes. Compound hashed attributes separately join and SHA-256 hash the hashed attribute names and values of which they are composed to create a new hashed attribute name and value, respectively. Finally, each hashed attribute's name is HMAC's to produce the blind attribute name and the SHA-256 hash of the joined name and value is HMAC'd to produce the (salted) blind attribute value.

The above process also allows for all HMAC'ing to occur at the end -- to enable computing all HMACs in parallel, which is important for efficiency when using remote key material (e.g., via WebKMS).

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

No branches or pull requests

1 participant