Title: ECDSA: Square roots, cube roots, clock (12th root), and other roots Post by: stwenhao on July 23, 2022, 11:22:16 AM Why this value can be rotated like in a clock?
Code: 1dba45ae684199cd23ab3f4de753d962f7a4e79060df26e4ed19c677b4a37800^1=1dba45ae684199cd23ab3f4de753d962f7a4e79060df26e4ed19c677b4a37800 Title: Re: ECDSA: Square roots, cube roots, clock (12th root), and other roots Post by: NotATether on July 23, 2022, 11:45:04 AM Why this value can be rotated like in a clock? Apparently because N^2 = 1, and this value (let's call it E) gets to N in 6 multiplications. And E^4 = E^2-1. I don't know what to make of this except E^2 would be sqrt(E^2-1), try checking that. (I am not sure how'd you compute a square root in a group!) Quote Are there other such values? How to get them? Is it possible to reach them for some other value like 2 or 3, for example to get it in five moves or in seven moves? Also, it is true for "n=fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141", is it possible to get it based on "p=fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"? Without a specialized ECC calculator you'd have to experiment with different values manually. If there was a way to find roots, then you could create arbitrary-sized roots of N (sqrt, cbrt, etc.) and generate a full circle that is about twice the size as the root being taken. Title: Re: ECDSA: Square roots, cube roots, clock (12th root), and other roots Post by: garlonicon on July 23, 2022, 01:34:11 PM Quote Why this value can be rotated like in a clock? Because "n-1=fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140" is divisible by 12.Code: (n-1)/12=155555555555555555555555555555553a393d1339460d5a4ffc328bbc048570 Quote Are there other such values? Yes, as long as you can divide n-1 by some number and get zero as a remainder, you can do that:Code: (n-1)/0xc0=155555555555555555555555555555553a393d1339460d5a4ffc328bbc04857 Quote How to get them? By using numbers, where (n-1) modulo your_number is zero.Quote Is it possible to reach them for some other value like 2 or 3, for example to get it in five moves or in seven moves? No, because (n-1)%5 is equal to one, and (n-1)%7 is equal to two.Quote is it possible to get it based on "p=fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"? Of course, but not for 12. For example for 14:Code: p/14=1249249249249249249249249249249249249249249249249249249236db6d71 Title: Re: ECDSA: Square roots, cube roots, clock (12th root), and other roots Post by: j2002ba2 on July 23, 2022, 02:20:38 PM Why this value can be rotated like in a clock? ... Are there other such values? How to get them? Is it possible to reach them for some other value like 2 or 3, for example to get it in five moves or in seven moves? Also, it is true for "n=fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141", is it possible to get it based on "p=fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"? There are many such values. Eventually what are you looking for is Primitive root modulo n (https://en.wikipedia.org/wiki/Primitive_root_modulo_n). From it you can get every possible root of 1. Here is an algorithm for finding a primitive root modulo prime p (that is (p-1)-th root of 1): Code: r = 1 Modulo p we get the following roots: 2 (square), 3 (cube), 7-th, 13341, 205115282021455665897114700593932402728804164701536103180137503955397371, and any multiple of these numbers, for a total of 25-1 = 31 possible roots (2nd, 3rd, 6th, 7th, 14th, 21st, 42th,...). Each k-th prime root has k-1 possible values besides 1. However if k is composite, some of the k-1 values are the corresponding smaller root, i.e. if a is 6-th root of 1, a3 would be square root of 1, and not 6th. Modulo n we get the following factors (and roots): 26, 3, 149, 631, 107361793816595537, 174723607534414371449, 341948486974166000522343609283189. 7 * 26 - 1 = 447 possible roots. Your example is for 22*3=12-th root. Here are two primitive roots of 1 modulo the corresponding prime: n: rn = 106331823171076060141872636901030920105366729272408102113527681246281393517969 p: rp = 77643668876891235360856744073230947502707792537156648322526682022085734511405 So, let's say you want a 631th root of 1 modulo n: x = pow(rn, (n-1)/631, n). Since 631 is prime number, you could get all 631 possible 631-th roots of 1 (modulo n) by rising x to the power from 1 to 631. |