Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Crypto Extensions #30

Merged
merged 12 commits into from
Jul 7, 2022
Merged

Crypto Extensions #30

merged 12 commits into from
Jul 7, 2022

Conversation

larryk85
Copy link

@larryk85 larryk85 commented Jul 7, 2022

Change Description

Adding support for CAPI for the new crypto primitives and C++ api support for SHA3/Keccak and the new get_block_num functions.

API Changes

  • API Changes

CAPI now has the functions:

  • void sha3( const char*, uint32_t, char*, uint32_t , int32_t)
  • int32_t blake2_f(uint32_t, const char*, uint32_t, const char*, uint32_t, const char*, uint32_t, const char*, uint32_t, int32_t, char* , uint32_t)
  • int32_t k1_recover( const char*, uint32_t, const char*, uint32_t, char*, uint32_t)
  • int32_t alt_bn128_add( const char*, uint32_t, const char*, uint32_t, char*, uint32_t)
  • int32_t alt_bn128_mul( const char*, uint32_t, const char*, uint32_t, char*, uint32_t)
  • int32_t alt_bn128_pair( const char*, uint32_t)
  • int32_t mod_exp( const char*, uint32_t, const char*, uint32_t, const char*, uint32_t, char*, uint32_t)
  • uint32_t get_block_num( void )

The C++ API now has the functions:

  • block_num_t current_block_number() - this is in system.hpp
  • eosio::checksum256 sha3(const char*, uint32_t) - this is in crypto.hpp
  • eosio::checksum256 keccak(const char*, uint32_t) - this in crypto.hpp
  • void assert_sha3(const char*, uint32_t, eosio::checksum256&) - this is in crypto.hpp
  • void assert_keccak(const char*, uint32_t, eosio::checksum256&) - this in in crypto.hpp

Documentation Additions

  • Documentation Additions

Bucky Kittinger added 3 commits July 7, 2022 01:52
@arhag arhag added this to the CDT 3.0.0-rc1 milestone Jul 7, 2022
@larryk85 larryk85 merged commit b0fd696 into main Jul 7, 2022
@larryk85 larryk85 deleted the larryk85/crypto-extensions branch July 7, 2022 06:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants