diff --git a/core/src/main/java/org/bitcoinj/crypto/HDKeyDerivation.java b/core/src/main/java/org/bitcoinj/crypto/HDKeyDerivation.java index 80d8c807..55d96a3e 100644 --- a/core/src/main/java/org/bitcoinj/crypto/HDKeyDerivation.java +++ b/core/src/main/java/org/bitcoinj/crypto/HDKeyDerivation.java @@ -186,7 +186,7 @@ public final class HDKeyDerivation { } public static RawKeyBytes deriveChildKeyBytesFromPublic(DeterministicKey parent, ChildNumber childNumber, PublicDeriveMode mode) throws HDDerivationException { - checkArgument(!childNumber.isHardened(), "Can't use private derivation with public keys only."); + checkArgument(!childNumber.isHardened(), "Hardened derivation is unsupported (%s).", childNumber); byte[] parentPublicKey = parent.getPubKeyPoint().getEncoded(true); checkState(parentPublicKey.length == 33, "Parent pubkey must be 33 bytes, but is " + parentPublicKey.length); ByteBuffer data = ByteBuffer.allocate(37);