# Questions tagged [math]

The tag has no usage guidance.

37 questions
Filter by
Sorted by
Tagged with
75 views

### What is the byte-wise xor operation mentioned in bip 340?

Let t be the byte-wise xor of bytes(d) and hash_BIP0340/aux(a) Link: bip-0340 Actually, I think it means bitwise xor, not bytewise xor, but for the sake of clarity, I ask: What is the difference ...
1 vote
187 views

### What is the probability of randomly getting a 12 word seed phrase with the same word repeated 12 times?

It appears that the 12 word seed phrase CAN be the same word repeated 12 times. Is it true that the probability of randomly generating that "stuttering seed phrase" would be: = 2048 * (1/...
• 113
50 views

### Question on the integer size [closed]

Is there any kind of boolean division with bitcoin? There has to be something before the decimal number. Kind of say it seems like end to end and it always should be the number that is largest.
86 views

### What am I doing wrong in calculating point addition? Is something redundant in the formula I am using?

First of all, just to note that I am having trouble with this MOD math, so for some this question might be basic, but in my case it caused a lot of confusion. Just for the context. In my previous ...
• 940
1 vote
245 views

### Verifying a zkSNARK on Bitcoin/Hope for a future with OP_MUL

I am trying to write a script that can verify a SNARK, but from what I understand OP_MUL is still disabled in TapScript. Is anyone working on a BIP to provide OP_MUL or OP_MUL64? It seems ...
501 views

### What is the relationship between the three possible X coordinates corresponding to a Y coordinate?

Every possible X coordinate on secp256k1 has two corresponding Y coordinates, one of which is the negation of the other. I've also been told that every possible Y coordinate has three corresponding X ...
• 8,649
114 views

### What is the largest value that the x & y coordinates respectively can be/reach

We are all familiar with the x & y coordinates of the curve parameters used in bitcoin (or at least we should be). In terms of being a collective point on graph, we know that the starting point G ...
155 views

### What happens to bitcoin if math is found that makes reversing PQ multiplication, modular math, etc, easy to reverse in a few steps?

What happens to bitcoin if math is found that makes reversing multiplication, modular math, etc, easy to reverse in a few steps? What if DH exhanges can be decoded almost as fast as they can happen? ...
342 views

### Simple math in Script

I want to create a script that takes 3 numbers and verifies that: Each of the numbers is less than 8. The sum of the numbers is 15. How can I do that?
137 views

### secp256k1, reused nonce across two differents pubkeys

Edited: changing the notation according request by fgrieu. I have prepared 4 transactions for 2 pubkeys with the same r1 and r2. properties of secp256k1: p = ...
• 23
405 views

### How does this field multiplication in libsecp256k1 work?

I'm looking at libsecp256k1's codebase, for learning reasons (doubt I can contribute with anything useful there). While looking at the field implementation, the implementation of ...
• 1,076
194 views

### weak transaction in secp256k1

My question is related to weak signature vulnerability testing where a hypothetical attacker does not know the values of the nonce or private key itself, but can determine that the nonce 'k1' is ...
• 23
1 vote
86 views

### Secp256k1: Does there exist an identity public key for combinations of public keys?

I am aware that the identity on elliptic curves is the infinity element. Long shot (as it would be very useful to me): with that being said, does there exist a public key, pk, on secp256k1 such that, ...
• 35
1 vote
48 views

### Modelling random walks for double spending based on hashrate

I'm reading Analysis of hashrate-based double-spending where the following assumptions are made (on page 5): The total hashrate of the honest network and the attacker is constant, say H. Let the ...
928 views

### How much entropy is lost alphabetising your mnemonics?

Yes I know this is a horrible idea and not BIP39 compliant, but please help satisfy my curiosity with this "thought experiment" and applied maths exercise. Two questions, one for 12 words, ...
• 423
1 vote
132 views

### Proof that blockchain converges to the longest chain [duplicate]

Is there a mathematical proof that shows that blockchain converges to the longest chain? It seems not obvious to me how a scattered group of nodes and transaction signals will eventually converge to a ...
667 views

### Why do private keys have a range limit?

I am reading about ECDSA, and I find that the private key must be in (0,n), with n = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE BAAEDCE6 AF48A03B BFD25E8C D0364141. Is n the total number of points on the ...
1 vote
140 views

### Elliptic Curve Point Addition Question

I am doing a school project about Bitcoin and more specifically point addition on the Elliptic Curve. I am very new to all this so please forgive my mistakes. I have been reading that when adding ...
• 11
1 vote
81 views

### How to calculate daily weekly monthly price change in percentage?

I am trying to match the binance's daily price change. I know it does provide 24h price change in percentage but the value I calculate is off no matter what. So I am asking binance API to give me ...
• 111
230 views

### Jimmy Song 'Programming Bitcoin' book math doubt

I guess this is a math question and not a bitcoin question, but I would have a hard time expressing the doubt in a math forum, whereas here, maybe someone who knows the book and has the right ...
• 181
355 views

### Are there risks to using the same private key for both ECDSA and Schnorr signatures?

I think I've seen a comment by Greg Maxwell about this but am having trouble finding it. I think there was some risk when signing the same message with the same key with both algorithms? In this ...
• 5,154
50 views

### Can the minimum transaction with bitcoin (satochi) be updated to even less? [duplicate]

Or is it not changeable by design ?
42 views

### What does it mean to make mining more difficult? [duplicate]

Really I don't know nothing about bitcoin but now I got curious read something and immediately come to something on mind. I mean, there's a social economic comunity somewhere generating value based on ...
78 views

### How to calculate the new sequence number N for the new final field Fp curve?

Are there simplified algorithms or online services or Python scripts where can calculate a new ordinal N for a new finite field Fp in an elliptic curve? y^2 = x^3 + 7 I know that SageMath exists and ...
• 51
1k views

### Low-s value in bitcoin signature

What are the problems related in using the "normal" ( bigger than N/2) value of the s number in transaction signature and why we use the lower one? Is it about the math behind the ecdsa?
• 404
225 views

### Are transactions with the same ScriptSig a security problem?

For instance while looking at the transaction stack of my address, tracing it to exchanges I use, I came across this: https://www.blockchain.com/btc/tx/...
124 views

### Why is the Schnorr verification formula working and actually verifying the validity of a signature?

Reading the bottom of page 2 of the Musig Paper we can find that a Schnorr Signature for a cyclic Group G of prime order p with generator g is a tuple (R,s) where R = gr for a random secret r and s=r+...
• 11.8k
1 vote
166 views

### how to calculate Entropy from series of outcome? [closed]

I want to generate my own private key with dice and/or other very entropic phenomenon. But how can I calculate if my data have a good entropy ? I mean if I throw dice in a certain way too much time ...
945 views

### How is Bitcoin governed by mathematics?

I keep hearing talks from Bitcoin evangelists that claim Bitcoin isn't governed by any central authority, rather it's governed by mathematics. What exactly do they mean when they say "governed by ...
• 213
1 vote
3k views

### How to calculate coins mined per day?

Sorry for the noob question I'm pretty new to crypto coins and all this stuff. :) I wonder why the formula <your hashrate> / <coin difficulty> gives the mined coins as a result...Formula ...
• 113
9k views

### How do you derive the private key from two signatures that share the same k value?

I wrote my own ECDSA signature algorithm just for the purpose of creating unit tests. With it I created two signatures which went into transaction 56ec7ca7df..., sending from 1GXFXm3es.... These ...
• 1,047
452 views

### Mixing Unequal Inputs

Let's say have 3 inputs (alice, bob, satoshi): 0.3, 1.3, 1.6. We can mix these inputs for example like this: 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.1, 0.1. Or like this: 1.3, 1.3, 0.3, 0....
• 826
75 views

### Needed maths for full understanding

I often come across papers written in the Bitcoin space involving some math that I am not formally versed in. Could anyone point out general topics in math that I should have a formal grasp on in ...
• 178
1 vote
790 views

### What is the mathematics behind the maximum number of 21 million bitcoins that can be generated? [duplicate]

How is this number 21 million bitcoins arrived at? What is the mathematics behind this number? Or is this number a constant that can be changed in the source code?
• 123
1 vote
3k views

### How can I calculate the breakeven price for buying and reselling on cryptocurrency exchange?

Assume that one side of the position will be charged the TAKER fee (0.25%), and the other will be charged the MAKER fee (0.10%). I have tried using this formula, but when selling at the break even ...