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

add new hook names for crypto hooks #1216

Merged
merged 4 commits into from
Apr 21, 2020
Merged

add new hook names for crypto hooks #1216

merged 4 commits into from
Apr 21, 2020

Conversation

dwightguth
Copy link
Member

@ttuegel @sskeirik FYI

This is done in order to separate the crypto hooks out based on which native library they depend on in the llvm backend, in order to simplify the build process for new semantics. The old hooks will remain valid for the time being for backwards-compatibility.

@ehildenb
Copy link
Member

Have these hooks been added to the LLVM backend? Are we planning on incorporating the hooks from blockchain-k-plugin directly into the LLVM backend?

@dwightguth
Copy link
Member Author

No, these hooks are not part of the llvm backend because that would involve making developers install obscure Bitcoin and cryptography libraries in order to build the k frontend. It's not an issue with java and haskell because their package managers pull in the right libraries automatically.

@ehildenb
Copy link
Member

Ah sorry, I misread, forgot that this is only for the Java backend. Approving.

@ehildenb
Copy link
Member

Though I guess someone who needs this should approve as well.

@sskeirik
Copy link
Contributor

sskeirik commented Apr 20, 2020

EDIT: TL;DR version --- I vote we change HASH.sha3 hook to HASH.sha3_256.

Since we are changing hook names anyway, I propose the LLVM backend migrates from the name sha3 to sha3256 like the Haskell and Java backends or else something like sha3_256. I didn't think about changing that before since it wasn't a hook that I was adding, but I do think it makes sense to keep the digest size in bits after each hash function, for consistency of naming and also clarity. Thus, under this naming scheme we have either:

hash function name + digest size

hash function name + (separator when hash name ends with number) + digest size

@dwightguth
Copy link
Member Author

As far as I can tell, the build failed because github was experiencing problems. I restarted it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants