solana/runtime
Christian Kamm cf58640937
Keypair: implement clone() (#26248)
* Keypair: implement clone()

This was not implemented upstream in ed25519-dalek to force everyone to
think twice before creating another copy of a potentially sensitive
private key in memory.

See https://github.com/dalek-cryptography/ed25519-dalek/issues/76

However, there are now 9 instances of
  Keypair::from_bytes(&keypair.to_bytes())
in the solana codebase and it would be preferable to have a function.

In particular since this also comes up when writing programs and can
cause users to either start messing with lifetimes or discover the
from_bytes() workaround themselves.

This patch opts to not implement the Clone trait. This avoids automatic
use in order to preserve some of the original "let developers think
twice about this" intention.

* Use Keypair::clone
2022-08-06 11:54:38 -06:00
..
benches Refactor: Add `RuntimeConfig` field to Bank (#26946) 2022-08-05 20:49:00 +01:00
src Keypair: implement clone() (#26248) 2022-08-06 11:54:38 -06:00
store-tool Bump Version to 1.11.6 (#26906) 2022-08-03 12:48:43 -05:00
tests Make stake integration tests aware of stake minimum delegation (#24809) 2022-04-28 18:11:39 -05:00
.gitignore
Cargo.toml Bump Version to 1.11.6 (#26906) 2022-08-03 12:48:43 -05:00
build.rs