Title: K = k * g ????? Post by: Kostelooscoin on July 26, 2019, 02:51:45 PM 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 ??? Title: Re: K = k * g ????? Post by: slashbinslashnoname on July 27, 2019, 07:15:09 AM 000......2 * point de generation ne me donne pas la clef publique espérée j`ai besoin d`aide je sèche ??? Peux tu coller ton code ? Title: Re: K = k * g ????? Post by: elma on September 17, 2019, 08:45:17 PM Aura-t-on un jour la réponse ???
(à la fois, j'ai rien compris à la question ) Title: Re: K = k * g ????? Post by: Saint-loup on September 18, 2019, 08:48:11 AM Bonjour je fais appel aux membres qui pourrais m`éclairer sur ce calcul que je ne comprends pas 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.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 ??? 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/assets/mbc2_0404.png 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 https://www.entrust.com/wp-content/uploads/2014/03/WP_Entrust_Zero-to-ECC_March2014.pdfThe 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. 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 Title: Re: K = k * g ????? Post by: elma on September 18, 2019, 05:01:19 PM 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.
Title: Re: K = k * g ????? Post by: yogg on September 18, 2019, 05:19:13 PM 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 ? ;D |