Bitcoin Forum
May 06, 2024, 05:43:38 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1] 2 3 4 »
1  Bitcoin / Legal / Re: If i move to Canada with BTC. Do i owe tax to canada goverment? on: January 31, 2023, 04:28:33 PM
If someone owns 10 BTC and move to canada for living there permanently. do he owns canada govt. any tax on that bitcoin?

No, there is no tax to buy or hold cryptocurrencies in Canada. However, if you decide to sell your cryptocurrency holdings, a tax basis may arise.

Quote
The CRA generally treats cryptocurrency like a commodity for purposes of the Income Tax Act. Any income from transactions involving cryptocurrency is generally treated as business income or as a capital gain, depending on the circumstances.
source: https://www.canada.ca/en/revenue-agency/programs/about-canada-revenue-agency-cra/compliance/digital-currency/cryptocurrency-guide.html

Can the canada government ask for source of those BTC and how they are earned?

Yes. The government can request information about the source of your BTC, but only if it has been informed of your cryptocurrency holdings or after the sale.


Please read my questions again.

If someone buys cryptocurrency/ owns cryptocurrency before moving to canada then that means it is his capital before he become resident of canada so he should not be liable to pay tax on it in canada as this is the income from another country. no?
2  Bitcoin / Legal / If i move to Canada with BTC. Do i owe tax to canada goverment? on: January 31, 2023, 03:08:01 PM
If someone owns 10 BTC and move to canada for living there permanently. do he owns canada govt. any tax on that bitcoin? Can the canada government ask for source of those BTC and how they are earned?
3  Bitcoin / Legal / Tax Avoidance Possible legally with Bitcoin? on: January 31, 2023, 03:05:50 PM
Say if someone owns 10 Bitcoins which is not declared and government doesn't know about it (earned/mined etc but did not buy)  and now that someone want to avoid paying tax on cashing it out. Can he simply move to countries where there is 0 tax like (UAE) specifically dubai and setup a company there and cash out crypto over years in dubai bank account and later decide to move to his home country with all that money. Since dubai has 0 personal tax and his home country can't charge tax on it because of non-resident of home country. Is this possible?
4  Bitcoin / Bitcoin Technical Support / Re: How to hide public key of Bitcoin Address? on: November 18, 2022, 01:31:23 PM
So basically using multi-Sig cold wallet on airgapped machine provides the ultimate security?
I was thinking what if someone generate the same private key as my address in case of single address (which is very very unlikely) but using multi-sig makes this impossible,yes?
The chance of you messing up the multisig, and losing access to your funds, is much larger than the chance of someone finding your cold wallet's private key. The latter is just not going to happen (unless you make a mistake), the former can easily happen.

From your topics, you seem to have a hard time understanding how secure Bitcoin is. Maybe you should spend some time trying to brute-force the private key to a funded address, to convince yourself it's not going to happen.

Now i am not having a hard time understanding how secure bitcoin is But it wouldn't hurt to know more about cryptography in general. Does it? and it's a technical sub forum.
Also like you ask there's no harm if public key in known. So why to hide it? I know this BUT it wouldn't hurt to conceal it for privacy reasons does it?
See if the bitcoin devs didn't care about it they wouldn't introduce Taproot which essentially enables multi-sig wallet to conceal their pub keys and aggregate them into 1 key and no one can find out the real pub keys which is great IMO and helps in privacy. Even no one can find out if it's the multi-sig tx or single sig Cool
5  Bitcoin / Bitcoin Technical Support / Re: How to hide public key of Bitcoin Address? on: November 18, 2022, 10:04:25 AM
What is the public key of actual address that i mentioned in OP which is the address 3BJKWL5ipkVe2bjkRSt6ZNbVWQaRrEFjMs ?
That address is a multi-signature address and for generating that, you need all the three public keys.

In a m of n multi-signature address, there are n private keys and n public keys and you need m of the private keys to spend fund from that.
The address in question is 2 of 3 multi-signature. So, there are 3 public keys and 3 private keys and for spending fund from it, 2 of private keys are required.

Got it. Thanks for the explanation
So basically using multi-Sig cold wallet on airgapped machine provides the ultimate security?
I was thinking what if someone generate the same private key as my address in case of single address (which is very very unlikely) but using multi-sig makes this impossible,yes?
If an address is multi sig of say 3 address then attacker has to find 3 private keys correct?
Also bitcoin send to individual address which generate multi-Sig can also be spent individually right?
6  Bitcoin / Bitcoin Technical Support / Re: How to hide public key of Bitcoin Address? on: November 18, 2022, 09:44:03 AM
I mean for multi-sig wallet it's harder to find public key if there's output transactions?
No. It's not really hard.
As mentioned by jackg, you should use the redeem script to get the public keys.

I didn't know how it can be done. I just made a search and found out it's really easy.
Click here to see one of the transactions made from the address you referred to in the OP.
See the input with the index number 135. The sigscript includes 3 hex data. The last one is the redeem script.

Redeem script:
Code:
522102707f8c41a9ce80bd85c335ce37617388fe8fd5c7b6079f730fc8b7159867cb3e2102f61a255027b492203f04396474e032e759367ad32cdb1b317074e216718f9b532102ae11e6f80d33717c8dffcbd4e480b95f82f9fe7478cb166beebddd5b062c9f9653ae

For getting the public keys, all you need to do is to decode the redeem script using coinb.in tool.
The three public keys used for generating the address in question are as follows.

Code:
02707f8c41a9ce80bd85c335ce37617388fe8fd5c7b6079f730fc8b7159867cb3e
02f61a255027b492203f04396474e032e759367ad32cdb1b317074e216718f9b53
02ae11e6f80d33717c8dffcbd4e480b95f82f9fe7478cb166beebddd5b062c9f96

Ok so these 3 public keys you mentioned actually belongs to these address
02707f8c41a9ce80bd85c335ce37617388fe8fd5c7b6079f730fc8b7159867cb3e      -     17eHCSk6dL8naLmCUwUbHHWjykAsJGadoP
02f61a255027b492203f04396474e032e759367ad32cdb1b317074e216718f9b53   -    1KAXSrx2mcYSmyeS2YU442UH66EASTBoSK
02ae11e6f80d33717c8dffcbd4e480b95f82f9fe7478cb166beebddd5b062c9f96       -    1ADCkNGrDGVBEadFvQ2gMkXSZnfdNST3PJ


What is the public key of actual address that i mentioned in OP which is the address 3BJKWL5ipkVe2bjkRSt6ZNbVWQaRrEFjMs ?



Access to new features introduced in newer address types such as public key aggregation in Schnorr signatures.
Specifically regarding this feature, i want to ask that so this bascially helps in privacy right?
Say we aggregate 3 pub keys into 1 then it can be reversed too? I mean you can reverse this to find individual 3 pub keys back?
https://river.com/learn/what-are-schnorr-signatures/
7  Bitcoin / Bitcoin Technical Support / Re: How do i make sure my Bitcoin Private Key is Random and secure? on: November 18, 2022, 08:56:02 AM
--snip--
so using CSPRNG on new OS installation and just after reboot is not secure enough?

An expert say it's not secure enough only when your device has very little activity (such as headless or embedded device)[1]. But his research was performed a decade ago, so i don't know if it's applicable in 2022. Besides, average customer PC have lots activity including mouse movement, keyboard input and various application which opened on background after you login. So i wouldn't worry about insufficient entropy.

So what time should i wait before booting system to make sure there's enough entropy?

According to research i mentioned earlier, at least 1 minute. Although i'd recommend to do some activity (such as checking system log, perform internet speed test or use file explorer) to increase the entropy instead.

Also i guess on live machine/VM it's not safe to use CSPRNG?

If both live machine and VM has lots of activity and you wait few minutes, i don't see reason why it's not safe.

[1] https://dl.acm.org/doi/10.5555/2362793.2362828

The same applies to offline cold storage PC as well? If the system is not connected to internet. Then also there will be enough sources of entropy right?
8  Bitcoin / Bitcoin Technical Support / Re: How to hide public key of Bitcoin Address? on: November 18, 2022, 08:51:44 AM
None of your examples hide the public key and there's no way of doing that without using a different coin.

2.) I see Some Addresses do not reveal the public key even if they have spent their bitcoins like this address here - https://www.blockchain.com/btc/address/3BJKWL5ipkVe2bjkRSt6ZNbVWQaRrEFjMs     So How can this be possible?
The address in question is a multi-signature address and has been generated using three different public keys.
I don't know how, but it should be possible to derive all the three public keys from data of a transaction made from that address.

It seems they make up the redeem script and can be unscramble that way..

From https://en.bitcoin.it/wiki/BIP_0067#Specification:
Code:
022df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da
   03e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e9
   021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc18

You get (after sorting)

Code:
OP_2 021f2f6e1e50cb6a953935c3601284925decd3fd21bc445712576873fb8c6ebc18 

022df8750480ad5b26950b25c7ba79d3e37d75f640f8e5d9bcd5b150a0f85014da

03e3818b65bcc73a7d64064106a859cc1a5a728c4345ff0b641209fba0d90de6e9 OP_3 OP_CHECKMULTISIG

Which is a redeem script

So this redeem script is same as public key?
I mean for multi-sig wallet it's harder to find public key if there's output transactions?



1.) I know 100% that when you send bitcoins from legacy Address (P2PKH) then your public key gets revealed in transaction signature So this is also true in case of other Address formats (P2SH and P2WPKH) ?
Yes, your public key is always revealed. Since nodes need your public key for verifying your transaction, you have to reveal it.


2.) I see Some Addresses do not reveal the public key even if they have spent their bitcoins like this address here - https://www.blockchain.com/btc/address/3BJKWL5ipkVe2bjkRSt6ZNbVWQaRrEFjMs     So How can this be possible?
The address in question is a multi-signature address and has been generated using three different public keys.
I don't know how, but it should be possible to derive all the three public keys from data of a transaction made from that address.


3.) How can i hide my public key while still Re-using the same address for spending? I suppose it's possible because the address i mentioned in question 2 is able to achieve that.
I don't see any reason for hiding the public key and I said above, you have to reveal your public key whenever you make a transaction.


If all 3 address's types reveals public key when you send bitcoins then what's the additional advantage of using newer btc address types say Taproot one's (except the lower fees benefit) ?
9  Bitcoin / Bitcoin Technical Support / How to hide public key of Bitcoin Address? on: November 17, 2022, 10:38:21 PM
I know revealing public key is safe. I know that but still i have few questions.
So currently BTC has 3 Address formats as follows
1. Legacy Address (begins with 1... a.k.a P2PKH )
2. Non-Native Segwit Address (begins with 3... a.k.a P2SH )
3. Segwit Address (begins with bc1... a.k.a P2WPKH)

Questions
1.) I know 100% that when you send bitcoins from legacy Address (P2PKH) then your public key gets revealed in transaction signature So this is also true in case of other Address formats (P2SH and P2WPKH) ?

2.) I see Some Addresses do not reveal the public key even if they have spent their bitcoins like this address here - https://www.blockchain.com/btc/address/3BJKWL5ipkVe2bjkRSt6ZNbVWQaRrEFjMs     So How can this be possible?

3.) How can i hide my public key while still Re-using the same address for spending? I suppose it's possible because the address i mentioned in question 2 is able to achieve that.

10  Bitcoin / Bitcoin Technical Support / Re: How do i make sure my Bitcoin Private Key is Random and secure? on: November 17, 2022, 12:31:07 PM
Here -  https://privatekeys.pw/keys/bitcoin/1
You can see on the above link. Any attacker can easily brute force first few million private keys so how to prevent such attack?

Private key/address on those website is generated on-demand (basically when you access the page). I would recommend you try clicking button "Random" or "Last" on that website. Actual attacker could brute force either from beginning, ending, other specific range of number or even randomly.

One last question. Is it more secure to generate a 24 word seed using dice/coins (manually) OR using CSPRNG present is software like electrum etc ?  Which is more secure?

People usually would say both option are secure enough. Although it's hard to say which one is more secure since there are many variable involved needed to answer the question (such as quality of the dice or whether you call CSPRNG just after boot on device with very little activity/input). But FYI, Electrum actually utilize CSPRNG provided by operating system through function os.random()[1]. Electrum would use /dev/urandom on linux/unix-based OS and CryptGenRandom() on Windows OS[1].

[1] https://github.com/spesmilo/electrum/blob/4.3.2/electrum/wallet.py#L433
[2] https://docs.python.org/3.10/library/os.html#os.urandom

so using CSPRNG on new OS installation and just after reboot is not secure enough? So what time should i wait before booting system to make sure there's enough entropy? Also i guess on live machine/VM it's not safe to use CSPRNG?
11  Bitcoin / Bitcoin Technical Support / Re: How do i make sure my Bitcoin Private Key is Random and secure? on: November 17, 2022, 12:15:49 PM

Sure. If you generate a private key that is a relatively small integer (or very close to the high end of the range, or one that coincides with a sha256 hash of any common phrase or password), then it would be vulnerable.


How do i specifically avoid this? If i generate a private key using secure wallet like hardware wallet or may be software wallet like electrum then how do i make sure it's not vulnerable to this? (a small integer/or coincides with SHA256 hash of common phrase) ? or the probability of this happening is not worth considering?
12  Bitcoin / Bitcoin Technical Support / Re: How do i make sure my Bitcoin Private Key is Random and secure? on: November 16, 2022, 10:04:43 PM
Regarding your answer to second question. I was not saying i am using brain wallet. Please read again.
I fully understood you.

I meant i generate a bitcoin private key using secure wallet say for example mycellium wallet which is completely random key BUT the private key that i got now is 100% a SHA256 hash of some random 'text'. so that text might be a 'word' from the dictionary. There's a chance for that. This is what i meant to ask.
There's a chance of that, but that's almost impossible.
If you know that any bitcoin address can be generated by 2^96 private keys on average, you may worry even more. But as I said in my previous post, a bitcoin private key provides enough security and there's nothing to worry about.


Ok thanks
One last question. Is it more secure to generate a 24 word seed using dice/coins (manually) OR using CSPRNG present is software like electrum etc ?  Which is more secure?
13  Bitcoin / Bitcoin Technical Support / Re: How do i make sure my Bitcoin Private Key is Random and secure? on: November 16, 2022, 09:08:29 PM
1.)I checked the electrum code and it also uses RNG that just picks a random number between 1 and 2^256 so therotically RNG can a pick a 10 digit number too? or am i missing something here?
That's true only in theory. The probability of getting a 10 digit number is almost zero.


2.) Second question i have is. We all know how SHA256 can be used to convert any 'text' to a hash which is a valid private key right a.k.a brain wallets.
It's not recommended to use brain wallets. It's recommended to generate a random private key.


So my question is what if my wallet generate a key which is secure but what if that key is SHA256 hash of some 'poor dictionary word'?
No. There is no risk. What you worry about can happen only in theory. A private key generated properly provides enough security.

Regarding your answer to second question. I was not saying i am using brain wallet. Please read again.
I meant i generate a bitcoin private key using secure wallet say for example mycellium wallet which is completely random key BUT the private key that i got now is 100% a SHA256 hash of some random 'text'. so that text might be a 'word' from the dictionary. There's a chance for that. This is what i meant to ask.
14  Bitcoin / Bitcoin Technical Support / Re: How do i make sure my Bitcoin Private Key is Random and secure? on: November 16, 2022, 07:38:27 PM
ou can see on the above link. Any attacker can easily brute force first few million private keys so how to prevent such attack?

Use a good software. Never use a bad wallet when generating your private keys.

What are good software? The most recommended ones:
Electrum, ledger nano, trezor, blue wallet...

You may be using a bad software,  which might have a pior randomness and your private keys might be insecure. That is possible.
But if you generated your private keys using the software I suggested,  there is no risk of poor randomness

1.)I checked the electrum code and it also uses RNG that just picks a random number between 1 and 2^256 so therotically RNG can a pick a 10 digit number too? or am i missing something here?

2.) Second question i have is. We all know how SHA256 can be used to convert any 'text' to a hash which is a valid private key right a.k.a brain wallets.
So say i generate a very secure private key using very secure hardware wallet. so that private key is the hash of "some text" which we don't know because SHA256 is one way function but indeed there is "some text" on which we do SHA256 will give the same private key. So my question is what if my wallet generate a key which is secure but what if that key is SHA256 hash of some 'poor dictionary word'? There's no way to check this except comparing with all SHA256 of dictionary words. It's indeed a risk right? Am i being paranoid here?
15  Bitcoin / Bitcoin Technical Support / How do i make sure my Bitcoin Private Key is Random and secure? on: November 16, 2022, 05:38:27 PM
So this thing keeps giving me stress and i need answer  Huh

So i know bitcoin private key is secure and there are 2^256 private keys and i also understand that it's impossible for 2 people to generate the same btc private key.
BUT what i think is possible is a bitcoin wallet generating a bitcoin address whose private key is in the range of 1 to say 10000?? then it's vulnerable to attack right?
See basically a private key is an integer between 1 and 2^256 converted to hex right. So what's stopping Random number generator to pick a private key from say first few million integers??
Isn't this a vulnerability?
Of course, advanced user can simply convert their private key to hex and to decimal to check if it's a large enough integer but what about noobies?

Here -  https://privatekeys.pw/keys/bitcoin/1
You can see on the above link. Any attacker can easily brute force first few million private keys so how to prevent such attack?
16  Bitcoin / Electrum / Re: Random Number Seed on: November 16, 2022, 04:44:29 PM
I don't want to sound stupid but there's one thing that i need answer for
So a bitcoin private key is actually a random integer between 1 and 2^256 right and bitcoin wallet generate it randomly by using PRNG.
Ok so what's stopping PRNG from choosing say a random integer between 1 and 100000? Won't that make your private key insecure?
There's this website https://privatekeys.pw/keys/bitcoin/1
Here you can actually easily search private keys for any random integer value. So say if PRNG gives private key for value 9000000 then it's insecure right?
How to make sure the private key generated by bitcoin wallet is high quality?
17  Bitcoin / Electrum / Re: Random Number Seed on: November 15, 2022, 04:37:40 PM
Please read http://stackoverflow.com/questions/5480131/will-python-systemrandom-os-urandom-always-have-enough-entropy-for-good-crypto

/dev/urandom can indeed run out of entropy if it is called repeatedly.
{snip}



Sorry for bumping the old thread.
So does that mean say i repeatedly generate seeds say 100 seeds one after the other before finally deciding the choose the seed for my wallet. Does that make the seed less secure?

no it doesn't. /dev/urandom can generate unlimited cryptographically secure random numbers. it doesn't run out.

It doesn't run out that's true.
But there's something weird definitely.
I tried it. I created seeds in electrum wizard. After 30,40 seeds the wallet closed. (may be randomness was weakening? ) . I again open and tried. Same happened again.
Also the post i quoted. Electrum developer also confirmed /dev/urandom can run out of entropy if it is called repeatedly.
Found similar concern here as well - https://bitcoin.stackexchange.com/questions/62871/does-my-electrum-wallet-become-less-secure-if-i-keep-generating-seeds-until-i-se

andrew chow's response there is the correct answer to that question. andrew is a bitcoin core contributor and knows what he's talking about:

https://bitcoin.stackexchange.com/a/62894/5273

also  this answer to the stackoverflow question is the correct one:

https://stackoverflow.com/a/5498100

/dev/urandom only needs to be seeded with a small amount of entropy. this happens at bootup. after that its pseudo random number generator can generator unlimited amount of random numbers.

When people say a bad OS can fuck up /dev/urandom what do they mean by that?
I think i am being ultra paranoid here.
So if i want to generate a strong random seed it doesn't depend on say hardware?
I mean if i have old PC will it generate less random seed compared to new gen PC?
If i use electrum on linux vs windows which is more better to generate random seed?
18  Bitcoin / Electrum / is it Safe using console to generate seed? on: November 15, 2022, 02:27:19 PM
Hi, I read somewhere that every thing you do on electrum console is recorded and written to hard disk unencrypted. Is this TRUE?

I want to generate legacy seed and only way to do that currently is using electrum console (make_seed function)
So is it safe to generate say 24 words electrum seed using console and then use it? Am i at risk that my seed is written to the hard disk?
19  Bitcoin / Electrum / Re: Random Number Seed on: November 15, 2022, 02:23:13 PM
Please read http://stackoverflow.com/questions/5480131/will-python-systemrandom-os-urandom-always-have-enough-entropy-for-good-crypto

/dev/urandom can indeed run out of entropy if it is called repeatedly.
{snip}



Sorry for bumping the old thread.
So does that mean say i repeatedly generate seeds say 100 seeds one after the other before finally deciding the choose the seed for my wallet. Does that make the seed less secure?

no it doesn't. /dev/urandom can generate unlimited cryptographically secure random numbers. it doesn't run out.

It doesn't run out that's true.
But there's something weird definitely.
I tried it. I created seeds in electrum wizard. After 30,40 seeds the wallet closed. (may be randomness was weakening? ) . I again open and tried. Same happened again.
Also the post i quoted. Electrum developer also confirmed /dev/urandom can run out of entropy if it is called repeatedly.
Found similar concern here as well - https://bitcoin.stackexchange.com/questions/62871/does-my-electrum-wallet-become-less-secure-if-i-keep-generating-seeds-until-i-se
20  Bitcoin / Electrum / Re: Random Number Seed on: November 15, 2022, 01:03:36 PM
Please read http://stackoverflow.com/questions/5480131/will-python-systemrandom-os-urandom-always-have-enough-entropy-for-good-crypto

/dev/urandom can indeed run out of entropy if it is called repeatedly.
{snip}



Sorry for bumping the old thread.
So does that mean say i repeatedly generate seeds say 100 seeds one after the other before finally deciding the choose the seed for my wallet. Does that make the seed less secure?
Pages: [1] 2 3 4 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!