diff --git a/README.md b/README.md index 2e516bd..8ff5ef7 100644 --- a/README.md +++ b/README.md @@ -51,24 +51,24 @@ Also see for some further examples of " ### How long does it take? On my machine with an AMD Ryzen 7 5800X processor, Fingerprunk is able to generate and check about -43300 keys per second. This means that for finding a fingerprint with a string of *n* specific +41000 keys per second. This means that for finding a fingerprint with a string of *n* specific hexadecimal digits at a specific place, I could expect the following runtimes until finding the first key: -| *n* | expected tries | expected time | -| --: | --------------: | ------------: | -| *n* | 16ⁿ | 43300s / 16ⁿ | -| 2 | 256 | 0.0059 secs | -| 3 | 4096 | 0.0946 secs | -| 4 | 65536 | 1.5 secs | -| 5 | 1028576 | 24 secs | -| 6 | 16777216 | 6.5 mins | -| 7 | 268435456 | 103 mins | -| 8 | 4294967296 | 27 hours | -| 9 | 68719476736 | 18 days | -| 10 | 1099511627776 | 293 days | -| 11 | 17592186044416 | 13 years | -| 12 | 281474976710656 | 206 years | +| *n* | estimate tries | estimate time | +| --: | ---------------------: | ------------: | +| 1 | 16 = 16¹ | < 0.1 secs | +| 2 | 256 = 16² | < 0.1 secs | +| 3 | 4096 = 16³ | 0.1 secs | +| 4 | 65536 = 16⁴ | 1.6 secs | +| 5 | 1048576 = 16⁵ | 26 secs | +| 6 | 16777216 = 16⁶ | 7 mins | +| 7 | 268435456 = 16⁷ | 2 hours | +| 8 | 4294967296 = 16⁸ | 1 days | +| 9 | 68719476736 = 16⁹ | 19 days | +| 10 | 1099511627776 = 16¹⁰ | 310 days | +| 11 | 17592186044416 = 16¹¹ | 14 years | +| 12 | 281474976710656 = 16¹² | 218 years | -As you can see, anything above 8 or 9 fixed digits is pretty much unfeasible, at least with -a normal personal computer. \ No newline at end of file +As you can see, anything above 10 fixed digits is pretty much unfeasible, at least with a normal +personal computer. \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 94371d5..98239f4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,7 +22,7 @@ use sequoia_openpgp::{ prelude::SignatureBuilder, }, serialize::Serialize, - types::{HashAlgorithm, SignatureType, SymmetricAlgorithm}, + types::{Curve, HashAlgorithm, SignatureType, SymmetricAlgorithm}, }; type SecretKey = Key; @@ -92,7 +92,8 @@ impl Fingerprunk { let mut fingerprint_hex = String::with_capacity(20 * 2); loop { - let key = Key4::generate_ed25519().expect("should be able to generate key"); + let key = + Key4::generate_ecc(true, Curve::Ed25519).expect("should be able to generate key"); fingerprint_hex.clear(); write!(fingerprint_hex, "{:X}", key.fingerprint()) .expect("should write into string without error");