Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Conversation

@yang8621
Copy link
Contributor

@yang8621 yang8621 commented Sep 4, 2023

No description provided.

* Feat: move HMAC verification into enclave

- add gen_hmac_safe() function in functions.js
- add EH_GEN_HMAC action and ffi_generateHmac handler
- append GEN_HMAC to the tail of action list instead of inserting to the middle,
  so that the id of other items in the list will keep unchanged
- add enclave_generate_hmac function to enclave part
- add param verification to enclave_generate_hmac function
- add constant EH_HMAC_SHA256_SIZE as macro

* Chore: correct function description of GenerateHmac

* fix: cmk and apikey params is not checked in ffi_generateHmac

* fix: `hmac` is not free in ffi_generateHmac

* fix: clear sensitive info before return in enclave_generate_hmac

* Feat: change `payload` in ffi_generateHmac to base64 encoded string

* Fix: ehsm_kms_service/function.js still using raw string

- optimize the implementation of decoding `payload` params in ffi_generateHmac

* refactor: pass NULL to aad when decrypting cmk in enclaveGenHmac

---------

Co-authored-by: Tsz Lung, Chung <tsz.lung.chung@intel.com>
@yang8621 yang8621 reopened this Sep 13, 2023
@yang8621 yang8621 closed this Sep 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant