Skip to content

Conversation

@balladyna
Copy link
Collaborator

The purpose of this branch is to reimplement the SHA-256 and SHA-512 algorithms based on the crypto library. This addition enables secure hashing, which is essential for supporting operations related to Bitcoin, Ethereum and Cosmos, such as generating addresses, validating mnemonics and signing transactions.

List of changes:

  • created a_hash.dart, to serve as an abstraction for cryptographic hash functions by managing the conversion of byte input into a digest
  • created a_hash_sink.dart, to efficiently process streaming hash input by handling incoming data in chunks, managing buffering and ensuring correct endian formatting
  • created digest.dart, to represent the final output of hashing algorithm
  • created digest_sink.dart, to ensure that only the first received digest is stored, preventing overwrites
  • created a_sha_32bit_sink.dart, sha256.dart and sha256_sink.dart, to initialize the digest state, configure hash computation, define a block size and provide hashing logic for SHA-256
  • created a_sha_64bit_sink.dart, sha512.dart and sha512_sink.dart, to initialize the digest state, configure hash computation, define a block size and provide hashing logic for SHA-512

The purpose of this branch is to reimplement the SHA-256 and SHA-512 algorithms based on the crypto library. This addition enables secure hashing, which is essential for supporting operations related to Bitcoin, Ethereum and Cosmos, such as generating addresses, validating mnemonics and signing transactions.

List of changes:
- created a_hash.dart, to serve as an abstraction for cryptographic hash functions by managing the conversion of byte input into a digest
- created a_hash_sink.dart, to efficiently process streaming hash input by handling incoming data in chunks, managing buffering and ensuring correct endian formatting
- created digest.dart, to represent the final output of hashing algorithm
- created digest_sink.dart, to ensure that only the first received digest is stored, preventing overwrites
- created a_sha_32bit_sink.dart, sha256.dart and sha256_sink.dart, to initialize the digest state, configure hash computation, define a block size and provide hashing logic for SHA-256
- created a_sha_64bit_sink.dart, sha512.dart and sha512_sink.dart, to initialize the digest state, configure hash computation, define a block size and provide hashing logic for SHA-512
@balladyna balladyna force-pushed the ow-feature/crypto-dart-library branch from f580486 to e6c23c5 Compare February 27, 2025 14:39
@kronikarz kronikarz merged commit ac5126e into master Feb 27, 2025
2 checks passed
@kronikarz kronikarz deleted the ow-feature/crypto-dart-library branch February 27, 2025 14:46
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.

5 participants