Bitcoin Forum
April 20, 2024, 01:01:17 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: K = k * g ?????  (Read 243 times)
Kostelooscoin (OP)
Member
**
Offline Offline

Activity: 202
Merit: 16


View Profile
July 26, 2019, 02:51:45 PM
 #1

Bonjour je fais appel aux membres qui pourrais m`éclairer sur ce calcul que je ne comprends pas

pour la clef privée 0000000000000000000000000000000000000000000000000000000000000001
la clef publique est la suivante 0479BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798483ADA7726A3C 4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8

normal vu que la clef privée * le point de generation = 0479BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798483ADA7726A3C 4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8 = a la clef publique ce que je ne comprends pas c`est pour la seconde clef privee 00000.....2

000......2 * point de generation ne me donne pas la clef publique espérée

j`ai besoin d`aide je sèche  Huh
1713574877
Hero Member
*
Offline Offline

Posts: 1713574877

View Profile Personal Message (Offline)

Ignore
1713574877
Reply with quote  #2

1713574877
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713574877
Hero Member
*
Offline Offline

Posts: 1713574877

View Profile Personal Message (Offline)

Ignore
1713574877
Reply with quote  #2

1713574877
Report to moderator
1713574877
Hero Member
*
Offline Offline

Posts: 1713574877

View Profile Personal Message (Offline)

Ignore
1713574877
Reply with quote  #2

1713574877
Report to moderator
slashbinslashnoname
Newbie
*
Offline Offline

Activity: 19
Merit: 2


View Profile
July 27, 2019, 07:15:09 AM
 #2



000......2 * point de generation ne me donne pas la clef publique espérée

j`ai besoin d`aide je sèche  Huh

Peux tu coller ton code ?

elma
Hero Member
*****
Offline Offline

Activity: 1932
Merit: 940



View Profile WWW
September 17, 2019, 08:45:17 PM
 #3

Aura-t-on un jour la réponse Huh
(à la fois, j'ai rien compris à la question )

"Qu’on me donne six lignes écrites de la main du plus honnête homme, j'y trouverai de quoi le faire pendre.“ (Richelieu)
Saint-loup
Legendary
*
Offline Offline

Activity: 2590
Merit: 2346



View Profile
September 18, 2019, 08:48:11 AM
Merited by yogg (3), Halab (3), Yaplatu (1)
 #4

Bonjour je fais appel aux membres qui pourrais m`éclairer sur ce calcul que je ne comprends pas

pour la clef privée 0000000000000000000000000000000000000000000000000000000000000001
la clef publique est la suivante 0479BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798483ADA7726A3C 4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8

normal vu que la clef privée * le point de generation = 0479BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798483ADA7726A3C 4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8 = a la clef publique ce que je ne comprends pas c`est pour la seconde clef privee 00000.....2

000......2 * point de generation ne me donne pas la clef publique espérée

j`ai besoin d`aide je sèche  Huh
Si tu as juste fait une multiplication arithmétique basique, c'est normal, c'est pas un produit classique. C'est un produit scalaire de courbe elliptique.

Antonopoulos explique la philosophie du truc dans Mastering Bitcoin:

Generating a Public Key
Starting with a private key in the form of a randomly generated number k, we multiply it by a predetermined point on the curve called the generator point G to produce another point somewhere else on the curve, which is the corresponding public key K. The generator point is specified as part of the secp256k1 standard and is always the same for all keys in bitcoin:
K = k * G
where k is the private key, G is the generator point, and K is the resulting public key, a point on the curve. Because the generator point is always the same for all bitcoin users, a private key k multiplied with G will always result in the same public key K. The relationship between k and K is fixed, but can only be calculated in one direction, from k to K. That’s why a bitcoin address (derived from K) can be shared with anyone and does not reveal the user’s private key (k).
...
Public key K is defined as a point K = (x,y)
...
Our goal is to find the multiple kG of the generator point G, which is the same as adding G to itself, k times in a row. In elliptic curves, adding a point to itself is the equivalent of drawing a tangent line on the point and finding where it intersects the curve again, then reflecting that point on the x-axis.




https://www.oreilly.com/library/view/mastering-bitcoin-2nd/9781491954379/ch04.html

Sinon tu peux trouver une methode de calcul dans ce doc

Quote
Integer Multiplication of Elliptic Curve Points

The primitive operation used in all elliptic-curve public-key cryptographic
applications is multiplication of a point by an integer.
This involves repeated application of the point-doubling and point-
addition operations; the number of operations being determined by the
number of bits in the binary representation of the integer multiplier. Each
bit of the multiplier is processed separately and sequentially.
The outcome of processing each bit of the multiplier results from a
doubling of the outcome of processing the previous bit and an optional
addition of the base point, depending on the value of the current bit of
the multiplier.
Representing n in binary form with m+1 bits, then:

n = n0 + n1.2 + n2.22+ ... + nm.2m
where [n0 .. nm] are bits {0,1}

The algorithm for calculating P = nG is:

 P := 0
 for i from m to 0 do
   P := 2P
   if ni == 1 then P := P + G
return P

If, for example, n were a 256-bit number, then this algorithm would
require a maximum of 512 elliptic-curve operations, whereas the naïve
approach of adding G to itself n-1 times would require (at least) an
impossible 2255-1 operations.

Because the “if” statement depends on the value of one bit from n, the
uncertainty in the path leading to the final result is 2m. For m of sufficient
size, it becomes impossible in practice to figure out the value of n
required to multiply G in order to obtain P. Attempting to calculate n from
P and G is known as the elliptic-curve discrete logarithm problem.
https://www.entrust.com/wp-content/uploads/2014/03/WP_Entrust_Zero-to-ECC_March2014.pdf


Et Jimmy Song donne un exemple d'implementation en Python dans son dernier bouquin (Programming Bitcoin)
https://books.google.fr/books?id=QWaHDwAAQBAJ&pg=PA57





██
██
██
██
██
██
██
██
██
██
██
██
██
... LIVECASINO.io    Play Live Games with up to 20% cashback!...██
██
██
██
██
██
██
██
██
██
██
██
██
elma
Hero Member
*****
Offline Offline

Activity: 1932
Merit: 940



View Profile WWW
September 18, 2019, 05:01:19 PM
 #5

Merci Saint-Loup grâce à toi je comprends maintenant pourquoi mes profs de maths me regarder en levant les yeux au ciel et en secouant la tête.

"Qu’on me donne six lignes écrites de la main du plus honnête homme, j'y trouverai de quoi le faire pendre.“ (Richelieu)
yogg
Legendary
*
Offline Offline

Activity: 2464
Merit: 3158



View Profile WWW
September 18, 2019, 05:19:13 PM
 #6

Merci beaucoup Saint-Loup pour ton post et ces explications claires !

Merci Saint-Loup grâce à toi je comprends maintenant pourquoi mes profs de maths me regarder en levant les yeux au ciel et en secouant la tête.

Hah, on a eu les mêmes profs de maths ? Grin
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!