* Both TrustedCoin and ourselves (CryptoCorp) incorporate delays as a
security measure. There can also be delays caused by the user being
called out of band. Not locking outputs will have a UX impact (can't
pay for coffee after paying my rent). Maybe do locking in a second
phase?
Hi Johann, I will take a look later. However params are not necessary for bloom filter construction because what's added to the filter are the hash160s and not the checksummed and versioned address bytes.
There is already a KeyChain interface. DKC delegates to BKC for parts of serialisation, filter construction and so on. I don't know if a different arrangement would work better for this use case - try it and see I guess.
Please forgive me if my responses are slow. I have my own project too and there is still much work to be done on basic HD wallets. If you're working on this full time you are very likely to run ahead of me.
Working on fee calculation, I'm kind of stuck on Wallet.estimateBytesForSigning. It is not clear for me what we are measuring here exactly.
Why this method returns pubkey.length + 75 bytes for send-to-address case or 74 bytes for send-to-pubkey?
Hello, I understand that married wallets are not complete and maybe that is the issue I am running into, but I figured I'd try asking here.
Wouldn't it sort of defeat the purpose of having a multisig 2-2 sort of thing, if one of the applications already had both master keys? This is why I think I am doing it wrong.
What I was trying to do is have a client be able to receive bitcoins to an address, but not be able to send them without another authentication from another source (the same idea as mobile authentication.
first being, bitcoinj would throw an error if I tried to create a married wallet, with a watching key containing only the public master key.
Since my last post, In order to test my curiosity, I made an edit to the bitcoinj code, in DeterministircKeyChain. on about line 888. by commenting out "key = key.getPubOnly();" in maybeLookAhead,
private void addInWalletSignatures(ArrayList<String> publicKeysNeededToBeSigned, ECKey.ECDSASignature[] signatureArray, Sha256Hash sighash) { int i = 0; for (String publicKeyNeededToBeSigned : publicKeysNeededToBeSigned) { byte[] publicKeyBytes = Utils.parseAsHexOrBase58(publicKeyNeededToBeSigned)); try { ECKey eckey = wallet().findKeyFromPubKey(publicKeyBytes);
if(eckey != null) { DeterministicKey deterministicKey = (DeterministicKey) privateECKey; ECKey.ECDSASignature ecdsaSignature = deterministicKey.sign(sighash); if(verifyTransaction(ecdsaSignature, deterministicKey.getPubKey(), sighash)) { signatureArray[i] = ecdsaSignature; } } } catch (IllegalAccessException e){} i++; } } private Script getInputScript(ECKey.ECDSASignature[] signatureArray, byte[] program) { ImmutableList.Builder<TransactionSignature> buildingSignatures= ImmutableList.builder();
for (int i = 0; i < signatureArray.length; i++) { if(signatureArray[i] != null) { TransactionSignature transactionSignature = new TransactionSignature(signatureArray[i], Transaction.SigHash.ALL, false); buildingSignatures.add(transactionSignature); } } List<TransactionSignature> signatureList = buildingSignatures.build(); //Script inputScript = ScriptBuilder.createMultiSigInputScript(signatureList);
Script inputScript = ScriptBuilder.createP2SHMultiSigInputScript(signatureList, program); return inputScript; }I needed to sign with with wallet.findKeyFromPubKey(), which returned a ECkey. Today, after casting it into a DeterministicKey, everything works great. The best thing about this is now I am back to the master branch.
private Script getInputScript(ECKey.ECDSASignature[] signatureArray, byte[] program)
--
For MultiBit we decided that the runtime loading of classes was too much of a security risk to implement. There isn't really any protection in the JVM once a class is running.
Making the completion process know how to gather signatures from multiple pluggable sources, let's call them TransactionSigners.
Making the completion process asynchronous.
Current implementation doesn't allow to specify multisig threshold. Only majority of keys required to spend (2-of-2, 2-of-3, 3-of-4 and so on). To support mutisigs like 3-of-3, threshold needs to be stored in KeyChainGroup. Is there an easy way to serialize such a value? Most streamlined way is to introduce new protobuf message for KeyChainGroup to keep threshold and keys, but this would not be backward compatible with existing wallets.
--
--
You received this message because you are subscribed to a topic in the Google Groups "bitcoinj" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bitcoinj/Uxl-z40OLuQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bitcoinj+u...@googlegroups.com.
Lately there's been a flowering of many third party risk analysis services. These services typically will ask the user to verify via an SMS when sending coins, or perhaps do some more complex risk analysis like skipping the SMS for known-safe recipients (identified via BIP 70). On IRC Johann asked about how best to integrate them into bitcoinj, so here are some initial design thoughts. Feedback welcome!I will call these married wallets. I do not use the more common term "multi-sig wallet" because multi-sig is a rather general feature and the details can get complicated quickly: for instance, a common use case for a multi-sig wallet is something like a board of directors in a company controlling funds, which has a rather different structure and API needs from the always-online 1-party risk analysis case. I'm also not calling them risk analyzed wallets because the Wallet code already has a notion of risk analysis, which is about trying to determine whether a pending transaction is likely to get double spent (it's not very useful today to be honest). Also the term married wallet correctly conjures the image of the wallet being required to get the significant others permission to spend money ;) But other suggestions are welcome.