Bitcoin Forum
June 21, 2024, 11:09:30 AM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 [3] 4 5 6 7 8 9 »
41  Bitcoin / Development & Technical Discussion / Re: Address generator and validation from a file on: April 12, 2022, 12:31:38 PM
bryanflyer searches for hash160, aren't they the same?
42  Bitcoin / Development & Technical Discussion / Re: Address generator and validation from a file on: April 12, 2022, 11:59:40 AM
I will answer myself:
https://github.com/TheRealLordFractal/Bip39Helper
https://github.com/ryancdotorg/brainflayer
43  Bitcoin / Bitcoin Discussion / Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it on: April 12, 2022, 06:38:42 AM

wtf?
44  Bitcoin / Project Development / Re: ecctools - a small collection of tools written in C on: April 06, 2022, 02:58:00 PM
Code:
~/ecctools$ ./addr2rmd
-bash: ./addr2rmd: No such file or directory

Code:
~/ecctools$ make
gcc -O3 -c bloom/bloom.c -o bloom.o
gcc -O3 -c sha256/sha256.c -o sha256.o
gcc -O3 -c base58/base58.c -o base58.o
gcc -O3 -c rmd160/rmd160.c -o rmd160.o
gcc -O3 -c xxhash/xxhash.c -o xxhash.o
#gcc -O3 -c gmpecc.c -o gmpecc.o
gcc -O3 -c util.c -o util.o
gcc -O3 -o rehashaddress rehashaddress.c gmpecc.c util.o sha256.o base58.o rmd160.o -lgmp
gcc -O3 -o calculatefromkey calculatefromkey.c gmpecc.c util.o base58.o sha256.o rmd160.o -lgmp `libgcrypt-config --cflags --libs`
gcc -O3 -o calculatefrompublickey calculatefrompublickey.c util.o base58.o sha256.o rmd160.o -lgmp
gcc -O3 -o keydivision keydivision.c gmpecc.c util.o base58.o sha256.o rmd160.o -lgmp
gcc -O3 -o keymath keymath.c gmpecc.c util.o  base58.o sha256.o rmd160.o -lgmp
gcc -O3 -o modmath  modmath.c gmpecc.c util.o  base58.o sha256.o rmd160.o -lgmp
gcc -O3 -o keygen keygen.c gmpecc.c util.o sha256.o base58.o rmd160.o -lgmp -lcrypto `libgcrypt-config --cflags --libs`
keygen.c: In function ‘main’:
keygen.c:152:38: warning: unknown conversion type character ‘\x0a’ in format [-Wformat=]
  152 |     fprintf(stderr,"OpenSSL error: %l\n",err);
      |                                      ^~
keygen.c:152:20: warning: too many arguments for format [-Wformat-extra-args]
  152 |     fprintf(stderr,"OpenSSL error: %l\n",err);
      |                    ^~~~~~~~~~~~~~~~~~~~~
keygen.c:135:4: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
  135 |    fread(buffer_key,1,bytes,fd);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
keygen.c:145:4: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
  145 |    fread(buffer_key,1,bytes,fd);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
keygen.c:158:4: warning: ignoring return value of ‘getrandom’, declared with attribute warn_unused_result [-Wunused-result]
  158 |    getrandom(buffer_key,bytes,GRND_NONBLOCK);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O3 -o sharedsecret sharedsecret.c gmpecc.c util.o sha256.o base58.o rmd160.o -lgmp `libgcrypt-config --cflags --libs`
sharedsecret.c: In function ‘main’:
sharedsecret.c:82:2: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
   82 |  fgets(buffer,1022,stdin);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
sharedsecret.c:90:2: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
   90 |  fgets(buffer,1022,stdin);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
rm *.o
45  Bitcoin / Development & Technical Discussion / Address generator and validation from a file on: April 01, 2022, 02:34:39 PM
The idea is very simple and most likely is on github, but I can’t find it.
Bitcoin address generator based on 12 phrases (address;private key) and checking the address from the list of all addresses (addresses.txt) when matching addresses are found, writing them to the file found.txt (address;private key)
Maybe someone met a similar implementation?
46  Economy / Games and rounds / Re: Bitcoin Alpha Challenge 815.85631744 BTC on: March 31, 2022, 06:33:09 PM
It is necessary that the author reveal the numbers of vision313 without the second part, you still can’t guess, otherwise at least interest will remain.
47  Bitcoin / Bitcoin Discussion / Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it on: March 30, 2022, 12:15:26 PM
Quote
64 puzzle patterns:
What to do with it?
48  Economy / Digital goods / Re: python/sage script for sell on: March 27, 2022, 07:23:18 PM
strange. It is correct.

Btw. I modified your script:

Code:
import collections
import hashlib
import random
import os

EllipticCurve_1 = collections.namedtuple('EllipticCurve', 'name p a b g n h')

curve = EllipticCurve_1(
    'secp256k1',
    # Field characteristic.
    p=0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f,
    # Curve coefficients.
    a=0,
    b=7,
    # Base point.
    g=(0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798,
       0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8),
    # Subgroup order.
    n=0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141,
    # Subgroup cofactor.
    h=1,
)


# Modular arithmetic ##########################################################

def inverse_mod(k, p):
    """Returns the inverse of k modulo p.
    This function returns the only integer x such that (x * k) % p == 1.
    k must be non-zero and p must be a prime.
    """
    if k == 0:
        raise ZeroDivisionError('division by zero')

    if k < 0:
        # k ** -1 = p - (-k) ** -1  (mod p)
        return p - inverse_mod(-k, p)

    # Extended Euclidean algorithm.
    s, old_s = 0, 1
    t, old_t = 1, 0
    r, old_r = p, k

    while r != 0:
        quotient = old_r // r
        old_r, r = r, old_r - quotient * r
        old_s, s = s, old_s - quotient * s
        old_t, t = t, old_t - quotient * t

    gcd, x, y = old_r, old_s, old_t

    assert gcd == 1
    assert (k * x) % p == 1

    return x % p


# Functions that work on curve points #########################################

def is_on_curve(point):
    """Returns True if the given point lies on the elliptic curve."""
    if point is None:
        # None represents the point at infinity.
        return True

    x, y = point

    return (y * y - x * x * x - curve.a * x - curve.b) % curve.p == 0


def point_neg(point):
    """Returns -point."""
    assert is_on_curve(point)

    if point is None:
        # -0 = 0
        return None

    x, y = point
    result = (x, -y % curve.p)

    assert is_on_curve(result)

    return result


def point_add(point1, point2):
    """Returns the result of point1 + point2 according to the group law."""
    assert is_on_curve(point1)
    assert is_on_curve(point2)

    if point1 is None:
        # 0 + point2 = point2
        return point2
    if point2 is None:
        # point1 + 0 = point1
        return point1

    x1, y1 = point1
    x2, y2 = point2

    if x1 == x2 and y1 != y2:
        # point1 + (-point1) = 0
        return None

    if x1 == x2:
        # This is the case point1 == point2.
        m = (3 * x1 * x1 + curve.a) * inverse_mod(2 * y1, curve.p)
    else:
        # This is the case point1 != point2.
        m = (y1 - y2) * inverse_mod(x1 - x2, curve.p)

    x3 = m * m - x1 - x2
    y3 = y1 + m * (x3 - x1)
    result = (x3 % curve.p,
              -y3 % curve.p)

    assert is_on_curve(result)

    return result


def scalar_mult(k, point):
    """Returns k * point computed using the double and point_add algorithm."""
    assert is_on_curve(point)

    if k % curve.n == 0 or point is None:
        return None

    if k < 0:
        # k * point = -k * (-point)
        return scalar_mult(-k, point_neg(point))

    result = None
    addend = point

    while k:
        if k & 1:
            # Add.
            result = point_add(result, addend)

        # Double.
        addend = point_add(addend, addend)

        k >>= 1

    assert is_on_curve(result)

    return result


# Keypair generation and ECDSA ################################################

def make_keypair(private):
    """Generates a random private-public key pair."""
    private_key = private#random.randrange(1, curve.n)
    public_key = scalar_mult(private_key, curve.g)

    return private_key, public_key


def hash_message(message):
    """Returns the truncated SHA512 hash of the message."""
    message_hash = hashlib.sha512(message).digest()
    e = int.from_bytes(message_hash, 'big')

    # FIPS 180 says that when a hash needs to be truncated, the rightmost bits
    # should be discarded.
    z = e >> (e.bit_length() - curve.n.bit_length())

    assert z.bit_length() <= curve.n.bit_length()

    return z


def sign_message(private_key, message,nonce):
    z = hash_message(message)

    r = 0
    s = 0
    half_mod=57896044618658097711785492504343953926418782139537452191302581570759080747169
   
    while not r or not s:
        k = nonce# random.randrange(1, curve.n)
        x, y = scalar_mult(k, curve.g)

        r = x % curve.n
        s = ((z + r * private_key) * inverse_mod(k, curve.n)) % curve.n
        if s> half_mod:
            s=curve.n -s
        if s<0:
            s=s%curve.n
   
     
    return r, s,z

def verify_signature(public_key, message, signature):
    z=message
   
    r, s = signature

    w = inverse_mod(s, curve.n)
    u1 = (z * w) % curve.n
    u2 = (r * w) % curve.n

    x, y = point_add(scalar_mult(u1, curve.g),
                     scalar_mult(u2, public_key))

    if (r % curve.n) == (x % curve.n):
        return 'signature matches'
    else:
        return 'invalid signature'

def egcd(a, b):
    "Euclidean greatest common divisor"
    if a == 0:
        return (b, 0, 1)
    else:
        g, y, x = egcd(b % a, a)
        return (g, x - (b // a) * y, y)

def modinv(a, m):
    "Modular inverse"
    # in Python 3.8 you can simply return pow(a,-1,m)
    g, x, y = egcd(a, m)
    if g != 1:
        raise Exception('modular inverse does not exist')
    else:
        return x % m

   
 
   
def make_val(priv,nonce,msg,id):   

        private, public = make_keypair(priv)
         
        r,s,z = sign_message(private, msg,nonce)
         
        print()
        print("tra"+str(id)+"=", id)
       
        print("z"+str(id)+"=",z)
        print("r"+str(id)+"=",r)
        print("s"+str(id)+"=",s)
       
         
        return private,public,nonce,r,s,z
 
   
import random

a=2**119                                             # min nonce range
c=2**120                                  # max nonce range
priv=random.randrange(a,c)  # here put real privatekey for testing address

print("priv=",priv)

for i in range(1,22):
    priv=priv
    nonce=random.randrange(a,c)
    war= str(os.urandom(25)) + str(nonce)         # message for hash you can change
    msg= bytes(war, 'utf-8')
    make_val(priv,nonce,msg,i)
 
Can you explain what this script does?
How to set input parameters?
49  Economy / Games and rounds / Re: Bitcoin Alpha Challenge 815.85631744 BTC on: March 24, 2022, 12:58:40 PM
This is not a hint, it was in hint 3: "V" = "verify" = 7 Sad
And all these hints will not give anything without knowing the symbols from the second task.
Such a number of characters cannot be brute forced.
50  Bitcoin / Bitcoin Discussion / Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it on: March 24, 2022, 04:03:01 AM
Which b? Between which 2 and H?  Smiley
51  Bitcoin / Bitcoin Discussion / Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it on: March 24, 2022, 03:38:57 AM
How did you come to this?
52  Bitcoin / Bitcoin Discussion / Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it on: March 21, 2022, 01:33:47 PM
Between the first
16jY7qLJnMcUAdSQqtQzqcBMcrSRedgSk2 (KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qZ2jqSaxonym9TTx57nT)
and last
16jY7qLJnsEheSTVBw7q7KBfhmF8aT96yu (KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYwD8Wy8p94y3aGy9Dw6)
address in your list, the difference in private keys is 19 characters, if it is 11 then it can be easily brute. But 8 characters is a huge abyss...
53  Bitcoin / Bitcoin Discussion / Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it on: March 20, 2022, 06:45:10 PM
Why generate a template: "16jY7qLJn"?
There are still a lot of such addresses, this will not help in any way to find the private key from 16jY7qLJnxb7CHZyqBP8qca9d51gAjyXQN
54  Economy / Games and rounds / Re: Bitcoin Alpha Challenge 815.85631744 BTC on: March 19, 2022, 10:24:50 AM
guys i am literally losing my MIND now!

just tell me is this seems fake puzzle or real ? so i don't waste anytime trying to solve it.

No one but the creator can know this.
Keep on tormenting Smiley
55  Economy / Games and rounds / Re: Bitcoin Alpha Challenge 815.85631744 BTC on: March 18, 2022, 03:45:18 PM
the bid has already been given, it remains only for the seller to agree to this price.
56  Economy / Games and rounds / Re: Bitcoin Alpha Challenge 815.85631744 BTC on: March 18, 2022, 06:12:06 AM
My logic is this:
VISION - 6 characters, 6 characters are also missing. If one character is 2-digit, then there will be extra characters



The heat has gone, there is already an offer for 0.1eth for hints.

[moderator's note: consecutive posts merged]
57  Economy / Games and rounds / Re: Bitcoin Alpha Challenge 815.85631744 BTC on: March 17, 2022, 05:45:37 PM
why 12 = C ?
explain please.
2 characters cannot be in the answer. Decimal to hexadecimal.
58  Economy / Games and rounds / Re: Bitcoin Alpha Challenge 815.85631744 BTC on: March 17, 2022, 12:54:35 PM
Tip 5: "S" = "System" = 12.

Tip 5: "S" = "System" = 12 = C?
59  Bitcoin / Bitcoin Discussion / Re: == Bitcoin challenge transaction: ~100 BTC total bounty to solvers! ==UPDATED== on: March 16, 2022, 06:51:18 PM
For the pool, any piece of hardware is welcome... It always reduces the rest of the ranges that the correct key fits.
I would like to remind everyone - that the creator of the pool adds $500 from himself for the person who finds the solution (if the prize according to the result from the TOP15 is lower than a one thousand dollars).
Today - to encourage all to join and actively participate in looking for the key - I am adding another $500 from myself on the same terms, so the bonus is now guaranted $1000 if you find solution with us.
As a reminder, I will remind the url to the pool: ===> http://ttdsales.com/64bit/ <===
What do you benefit from this?
Where is the guarantee that the owner of the pool will not take everything for himself?
60  Bitcoin / Bitcoin Discussion / Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it on: March 14, 2022, 06:36:24 PM

Did you try this bro ?

no, I don't understand what it is.
Pages: « 1 2 [3] 4 5 6 7 8 9 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!