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

[New Hints] cairo_keccak.json #1020

Closed
pefontana opened this issue Apr 19, 2023 · 0 comments · Fixed by #1058
Closed

[New Hints] cairo_keccak.json #1020

pefontana opened this issue Apr 19, 2023 · 0 comments · Fixed by #1058
Assignees
Labels
whitelisted-hint Implementation of hint on whitelist directory

Comments

@pefontana
Copy link
Member

pefontana commented Apr 19, 2023

Implement the remaining hints in 0.8.2.json

NewHint#66 SIMILAR to CAIRO_KECCAK_FINALIZE

assigned: pelito
status: in review

                "# Add dummy pairs of input and output.",
                "_keccak_state_size_felts = int(ids.KECCAK_STATE_SIZE_FELTS)",
                "_block_size = int(ids.BLOCK_SIZE)",
                "assert 0 <= _keccak_state_size_felts < 100",
                "assert 0 <= _block_size < 1000",
                "inp = [0] * _keccak_state_size_felts",
                "padding = (inp + keccak_func(inp)) * _block_size",
                "segments.write_arg(ids.keccak_ptr_end, padding)"

NewHint#67 SIMILAR to BLOCK_PERMUTATION_WHITELIST

assigned: pelito
status: in review

                "_keccak_state_size_felts = int(ids.KECCAK_STATE_SIZE_FELTS)",
                "assert 0 <= _keccak_state_size_felts < 100",
                "output_values = keccak_func(memory.get_range(",
                "    ids.keccak_ptr_start, _keccak_state_size_felts))",
                "segments.write_arg(ids.output, output_values)"

NewHint#68 SIMILAR to SHA256_INPUT

assigned: pelito
status: wip

                "ids.full_word = int(ids.n_bytes >= 8)"
@pefontana pefontana added the whitelisted-hint Implementation of hint on whitelist directory label Apr 19, 2023
@Oppen Oppen self-assigned this Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
whitelisted-hint Implementation of hint on whitelist directory
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants