-
Notifications
You must be signed in to change notification settings - Fork 8
Description
@saleemrashid commented on Tue Feb 25 2020
Current Plan
-
Keep
thiserror
usage behindthiserror
feature —thiserror
does not support#![no_std]
and hardware wallets will want to minimize code size socore::fmt
is out of the question. -
Add
trait Blake2b
and provide implementation forblake2b_simd
when feature is enabled. Hardware wallets have their own BLAKE2b implementations and will want to minimize code size by not adding another. For other embedded systems, there may be implementations more suitable thanblake2b_simd
. This requires adding aBlake2b
type parameter tostruct HStar
,PublicKey::verify
, andSecretKey::sign
. -
Wrap
blake2b_simd
andthiserror
in anstd
feature, and add#![cfg_attr(not(feature = "std"), no_std)]
. Replace alluse std::
withuse core::
.
Issues
-
The BLAKE2b issue will be present in other crates that hardware wallets need to use, so
trait Blake2b
would be useful there. Therefore, it doesn't seem like a good idea to define that trait in this crate. Which crate should it go in? -
How much code size does
rand_core
add? This is important for hardware wallets, especially ones that are not already using Rust as they will also incur the code size cost of the standard library. If it adds too much code size, perhaps another signing method should be added toSecretKey
, which accepts the entropy as a parameter, rather than accepting aCryptoRng
instance.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status