Created
August 19, 2015 07:11
-
-
Save ecki/a1f0262d68232cfc7041 to your computer and use it in GitHub Desktop.
Testing @DLogBot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test; | |
import java.math.BigInteger; | |
public class DLog | |
{ | |
// testing @DLogBot http://crypto.2015.rump.cr.yp.to/e7803fa1f87ce2a18dbbbbcffc8d5695.pdf | |
public static void main(String[] args) | |
{ | |
BigInteger apache = b("9fdb8b8a004544f0045f1737d0ba2e0b274cdf1a9f588218fb435316a16e374171fd19d8d8f37c39bf863fd60e3e300680a3030c6e4c3757d08f70e6aa871033"); | |
BigInteger modssl = b("d4bcd52406f69b35994b88de5db89682c8157f62d8f33633ee5772f11f05ab22d6b5145b9f241e5acc31ff090a4bc71148976f76795094e71e7903529f5a824b"); | |
BigInteger openssl = b("da583c16d9852289d0e4af756f4cca92dd4be533b804fb0fed94ef9c8a4403ed574650d36999db29d776276ba2d3d412e218f4dd1e084cf6d8003e7c4774e833"); | |
System.out.println("a " + b("2").modPow(b("0102030405060708FFFFFFFFFFFFFFFF"), apache).toString(16)); | |
System.out.println("m " + b("2").modPow(b("0102030405060708FFFFFFFFFFFFFFFF"), modssl).toString(16)); | |
System.out.println("o " + b("2").modPow(b("0102030405060708FFFFFFFFFFFFFFFF"), openssl).toString(16)); | |
} | |
public static BigInteger b(String hex) | |
{ | |
return new BigInteger(hex, 16); | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://twitter.com/eckes/status/633889906457190400 | |
eckes @eckes: | |
@DLogBot a 8dc0b9e968a841e8e98619527323b39d7a1dfcefd2f9ed95525b55b3b5cc49520e0d187b8773959de4e72516726d9c41220dcfedeac979b4aaa23c2aa3204877 | |
8:35am · 19 Aug 2015 | |
CA Services @DLogBot | |
@eckes 102030405060708ffffffffffffffff | |
8:36am · 19 Aug 2015 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment