-
Notifications
You must be signed in to change notification settings - Fork 44
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
ESAPI.hash would fails on too big input #239
Comments
Does it silently fail for you? or what happens? |
No, my bad, it's caught by the TPM2B_MAX_BUFFER initializer:
However, do you think the ESAPI could benefit from that sort of abstracted hash function? I also have an abstracted signing function that handles generates and use a tpm hash ticket for restricted signing keys. |
Sorry, I misread. The bigger question is how much extra functionality we want to add I guess. hashseq = ectx.hashseq(TPM2_ALG.SHA256, b"initial data")
hashseq.update(b"more data")
digest, ticket = hashseq.digest() |
No, it's not good to handle it in the python code, because policies generated may need to know how many commands were executed. So we don't want to automate this in the direct calls. However, we could have an option to the call to keep sending it if its set and default it to false. |
If data is bigger than
lib.MAX_BUFFER_SIZE
the TPM should send error. Is it worth catching it before in python code?Might be worth considering a higher level hash function taht handles the hash sequences if data input is too big.
For example:
The text was updated successfully, but these errors were encountered: