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

CIP: Integration of keccak256 into Plutus. #1

Closed
wants to merge 3 commits into from
Closed

Conversation

serejke
Copy link
Owner

@serejke serejke commented Jun 13, 2023

This CIP proposes integration of keccak256 hash function to Plutus.

Copy link

@iquerejeta iquerejeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I think we can open the pr to cardano-foundation. The only requested change is the naming. You should use CIP-???? until a number is assigned (see here).

Comment on lines 44 to 61
### Costing of function
We performed some benchmarks (2,7 GHz Quad-Core Intel Core i7) on the `keccak256` that can be used to finalize the costing:
* Empty Input:
* `keccak256("")` -> N ms
* Short Fixed-Length Inputs (1, 2, 4, 8, 16, 32)
* `keccak256("a" ^ 1)` -> N ms
* `keccak256("a" ^ 2)` -> N ms
* `keccak256("a" ^ 4)` -> N ms
* `keccak256("a" ^ 8)` -> N ms
* `keccak256("a" ^ 16)` -> N ms
* `keccak256("a" ^ 32)` -> N ms
* Long Fixed-Length Inputs (256, 512, 1024)
* `keccak256("a" ^ 256)` -> N ms
* `keccak256("a" ^ 512)` -> N ms
* `keccak256("a" ^ 1024)` -> N ms
* Recursive hashing
* `keccak256(keccak256("a"))` -> N ms
* `keccak256(keccak256(keccak256("a")))` -> N ms

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed. The costing will be handled in the future.

@serejke serejke changed the title CIP-0382: Integration of keccak256 into Plutus. CIP: Integration of keccak256 into Plutus. Jun 14, 2023
@serejke
Copy link
Owner Author

serejke commented Jun 14, 2023

Filed: cardano-foundation#524

@serejke serejke closed this Jun 14, 2023
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

Successfully merging this pull request may close these issues.

2 participants