mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Recognize a new JSON parameter `key_type` in handlers for wallet_propose
and sign/submit. In addition to letting the caller to specify either of
secp256k1 or ed25519, its presence prohibits the (now-deprecated) use of
heuristically polymorphic parameters for secret data -- the `passphrase`
parameter to wallet_propose will be not be considered as an encoded seed
value (for which `seed` and `seed_hex` should be used), and the `secret`
parameter to sign and submit will be obsoleted entirely by the same trio
above.
* Use constants instead of literals for JSON parameter names.
* Move KeyType to its own unit and add string conversions.
* RippleAddress
* Pass the entire message, rather than a hash, to accountPrivateSign()
and accountPublicVerify().
* Recognize a 33-byte value beginning with 0xED as an Ed25519 key when
signing and verifying (for accounts only).
* Add keyFromSeed() to generate an Ed25519 secret key from a seed.
* Add getSeedFromRPC() to extract the seed from JSON parameters for an
RPC call.
* Add generateKeysFromSeed() to produce a key pair of either type from
a seed.
* Extend Ledger tests to cover both key types.
43 lines
1.8 KiB
C++
43 lines
1.8 KiB
C++
//------------------------------------------------------------------------------
|
|
/*
|
|
This file is part of rippled: https://github.com/ripple/rippled
|
|
Copyright (c) 2012, 2013 Ripple Labs Inc.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
//==============================================================================
|
|
|
|
#include <BeastConfig.h>
|
|
|
|
#include <ripple/crypto/impl/Base58.cpp>
|
|
#include <ripple/crypto/impl/Base58Data.cpp>
|
|
#include <ripple/crypto/impl/CBigNum.cpp>
|
|
#include <ripple/crypto/impl/DHUtil.cpp>
|
|
#include <ripple/crypto/impl/ec_key.cpp>
|
|
#include <ripple/crypto/impl/ECDSA.cpp>
|
|
#include <ripple/crypto/impl/ECDSACanonical.cpp>
|
|
#include <ripple/crypto/impl/ECDSAKey.cpp>
|
|
#include <ripple/crypto/impl/ECIES.cpp>
|
|
#include <ripple/crypto/impl/GenerateDeterministicKey.cpp>
|
|
#include <ripple/crypto/impl/KeyType.cpp>
|
|
#include <ripple/crypto/impl/openssl.cpp>
|
|
#include <ripple/crypto/impl/RandomNumbers.cpp>
|
|
#include <ripple/crypto/impl/RFC1751.cpp>
|
|
|
|
#include <ripple/crypto/tests/CKey.test.cpp>
|
|
#include <ripple/crypto/tests/ECDSACanonical.test.cpp>
|
|
|
|
#if DOXYGEN
|
|
#include <ripple/crypto/README.md>
|
|
#endif
|