diff --git a/Cargo.toml b/Cargo.toml index 5e2dab49b6..2ad4efb5f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cryptatools-rs" -version = "0.1.0" +version = "0.1.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -9,7 +9,7 @@ edition = "2021" cryptatools-core = { path = "cryptatools-core", version = "0.1.0" } once_cell = "*" indexmap = "1.9.1" -uniffi_bindgen = "0.23.0" +uniffi_bindgen = "*" [dev-dependencies] criterion = "*" diff --git a/cryptatools-cli/src/statistical_cryptanalysis/main.rs b/cryptatools-cli/src/statistical_cryptanalysis/main.rs index 834ad108f4..83f91179ee 100644 --- a/cryptatools-cli/src/statistical_cryptanalysis/main.rs +++ b/cryptatools-cli/src/statistical_cryptanalysis/main.rs @@ -7,7 +7,7 @@ use clap::Parser; use serde::Deserialize; use serde_with::{serde_as, DisplayFromStr}; //use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGuesser; -use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::frequency_analysis::distribution_algorithms::statistical::Statistical; +use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::frequency_analysis::distribution_algorithms::statistical::Statistical; #[serde_as] diff --git a/cryptatools-core/binding-testing/testing.py b/cryptatools-core/binding-testing/testing.py index 3c75e70882..71d25c004a 100644 --- a/cryptatools-core/binding-testing/testing.py +++ b/cryptatools-core/binding-testing/testing.py @@ -147,6 +147,8 @@ assert hex_alphabet == [{'00': [0]}, {'01': [1]}, {'02': [2]}, {'03': [3]}, {'04': [4]}, {'05': [5]}, {'06': [6]}, {'07': [7]}, {'08': [8]}, {'09': [9]}, {'0a': [10]}, {'0b': [11]}, {'0c': [12]}, {'0d': [13]}, {'0e': [14]}, {'0f': [15]}, {'10': [16]}, {'11': [17]}, {'12': [18]}, {'13': [19]}, {'14': [20]}, {'15': [21]}, {'16': [22]}, {'17': [23]}, {'18': [24]}, {'19': [25]}, {'1a': [26]}, {'1b': [27]}, {'1c': [28]}, {'1d': [29]}, {'1e': [30]}, {'1f': [31]}, {'20': [32]}, {'21': [33]}, {'22': [34]}, {'23': [35]}, {'24': [36]}, {'25': [37]}, {'26': [38]}, {'27': [39]}, {'28': [40]}, {'29': [41]}, {'2a': [42]}, {'2b': [43]}, {'2c': [44]}, {'2d': [45]}, {'2e': [46]}, {'2f': [47]}, {'30': [48]}, {'31': [49]}, {'32': [50]}, {'33': [51]}, {'34': [52]}, {'35': [53]}, {'36': [54]}, {'37': [55]}, {'38': [56]}, {'39': [57]}, {'3a': [58]}, {'3b': [59]}, {'3c': [60]}, {'3d': [61]}, {'3e': [62]}, {'3f': [63]}, {'40': [64]}, {'41': [65]}, {'42': [66]}, {'43': [67]}, {'44': [68]}, {'45': [69]}, {'46': [70]}, {'47': [71]}, {'48': [72]}, {'49': [73]}, {'4a': [74]}, {'4b': [75]}, {'4c': [76]}, {'4d': [77]}, {'4e': [78]}, {'4f': [79]}, {'50': [80]}, {'51': [81]}, {'52': [82]}, {'53': [83]}, {'54': [84]}, {'55': [85]}, {'56': [86]}, {'57': [87]}, {'58': [88]}, {'59': [89]}, {'5a': [90]}, {'5b': [91]}, {'5c': [92]}, {'5d': [93]}, {'5e': [94]}, {'5f': [95]}, {'60': [96]}, {'61': [97]}, {'62': [98]}, {'63': [99]}, {'64': [100]}, {'65': [101]}, {'66': [102]}, {'67': [103]}, {'68': [104]}, {'69': [105]}, {'6a': [106]}, {'6b': [107]}, {'6c': [108]}, {'6d': [109]}, {'6e': [110]}, {'6f': [111]}, {'70': [112]}, {'71': [113]}, {'72': [114]}, {'73': [115]}, {'74': [116]}, {'75': [117]}, {'76': [118]}, {'77': [119]}, {'78': [120]}, {'79': [121]}, {'7a': [122]}, {'7b': [123]}, {'7c': [124]}, {'7d': [125]}, {'7e': [126]}, {'7f': [127]}, {'80': [128]}, {'81': [129]}, {'82': [130]}, {'83': [131]}, {'84': [132]}, {'85': [133]}, {'86': [134]}, {'87': [135]}, {'88': [136]}, {'89': [137]}, {'8a': [138]}, {'8b': [139]}, {'8c': [140]}, {'8d': [141]}, {'8e': [142]}, {'8f': [143]}, {'90': [144]}, {'91': [145]}, {'92': [146]}, {'93': [147]}, {'94': [148]}, {'95': [149]}, {'96': [150]}, {'97': [151]}, {'98': [152]}, {'99': [153]}, {'9a': [154]}, {'9b': [155]}, {'9c': [156]}, {'9d': [157]}, {'9e': [158]}, {'9f': [159]}, {'a0': [160]}, {'a1': [161]}, {'a2': [162]}, {'a3': [163]}, {'a4': [164]}, {'a5': [165]}, {'a6': [166]}, {'a7': [167]}, {'a8': [168]}, {'a9': [169]}, {'aa': [170]}, {'ab': [171]}, {'ac': [172]}, {'ad': [173]}, {'ae': [174]}, {'af': [175]}, {'b0': [176]}, {'b1': [177]}, {'b2': [178]}, {'b3': [179]}, {'b4': [180]}, {'b5': [181]}, {'b6': [182]}, {'b7': [183]}, {'b8': [184]}, {'b9': [185]}, {'ba': [186]}, {'bb': [187]}, {'bc': [188]}, {'bd': [189]}, {'be': [190]}, {'bf': [191]}, {'c0': [192]}, {'c1': [193]}, {'c2': [194]}, {'c3': [195]}, {'c4': [196]}, {'c5': [197]}, {'c6': [198]}, {'c7': [199]}, {'c8': [200]}, {'c9': [201]}, {'ca': [202]}, {'cb': [203]}, {'cc': [204]}, {'cd': [205]}, {'ce': [206]}, {'cf': [207]}, {'d0': [208]}, {'d1': [209]}, {'d2': [210]}, {'d3': [211]}, {'d4': [212]}, {'d5': [213]}, {'d6': [214]}, {'d7': [215]}, {'d8': [216]}, {'d9': [217]}, {'da': [218]}, {'db': [219]}, {'dc': [220]}, {'dd': [221]}, {'de': [222]}, {'df': [223]}, {'e0': [224]}, {'e1': [225]}, {'e2': [226]}, {'e3': [227]}, {'e4': [228]}, {'e5': [229]}, {'e6': [230]}, {'e7': [231]}, {'e8': [232]}, {'e9': [233]}, {'ea': [234]}, {'eb': [235]}, {'ec': [236]}, {'ed': [237]}, {'ee': [238]}, {'ef': [239]}, {'f0': [240]}, {'f1': [241]}, {'f2': [242]}, {'f3': [243]}, {'f4': [244]}, {'f5': [245]}, {'f6': [246]}, {'f7': [247]}, {'f8': [248]}, {'f9': [249]}, {'fa': [250]}, {'fb': [251]}, {'fc': [252]}, {'fd': [253]}, {'fe': [254]}, {'ff': [255]}], f"cipher={hex_alphabet} incorrect alphabet." print("encoding = {0}. OK!".format(hex_alphabet)) + + from cryptatools_core.python3_bindings import * bp = BirthdayParadox(a) diff --git a/cryptatools-core/src/cryptanalysis/common/mod.rs b/cryptatools-core/src/cryptanalysis/common/mod.rs new file mode 100644 index 0000000000..0c59eb7492 --- /dev/null +++ b/cryptatools-core/src/cryptanalysis/common/mod.rs @@ -0,0 +1 @@ +pub mod rsa; \ No newline at end of file diff --git a/cryptatools-core/src/cryptanalysis/chosen_plain_text_attacks/mod.rs b/cryptatools-core/src/cryptanalysis/common/rsa/common_modulus_attack.rs similarity index 100% rename from cryptatools-core/src/cryptanalysis/chosen_plain_text_attacks/mod.rs rename to cryptatools-core/src/cryptanalysis/common/rsa/common_modulus_attack.rs diff --git a/cryptatools-core/src/cryptanalysis/common/rsa/mod.rs b/cryptatools-core/src/cryptanalysis/common/rsa/mod.rs new file mode 100644 index 0000000000..4da7ea3d11 --- /dev/null +++ b/cryptatools-core/src/cryptanalysis/common/rsa/mod.rs @@ -0,0 +1 @@ +pub mod common_modulus_attack; \ No newline at end of file diff --git a/cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/brute_force/caesar_number.rs b/cryptatools-core/src/cryptanalysis/custom/chosen_plain_text_attacks/mod.rs similarity index 100% rename from cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/brute_force/caesar_number.rs rename to cryptatools-core/src/cryptanalysis/custom/chosen_plain_text_attacks/mod.rs diff --git a/cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/brute_force/caesar_number.rs b/cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/brute_force/caesar_number.rs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/brute_force/mod.rs b/cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/brute_force/mod.rs similarity index 100% rename from cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/brute_force/mod.rs rename to cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/brute_force/mod.rs diff --git a/cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/frequency_analysis/coincidence_index.rs b/cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/frequency_analysis/coincidence_index.rs similarity index 93% rename from cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/frequency_analysis/coincidence_index.rs rename to cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/frequency_analysis/coincidence_index.rs index e6b452c947..50e506c58f 100644 --- a/cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/frequency_analysis/coincidence_index.rs +++ b/cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/frequency_analysis/coincidence_index.rs @@ -21,7 +21,7 @@ impl CoincidenceIndexGuesser { /// Guess coincidence index of `cipher_text_input`. /// /// ``` - /// use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGuesser; + /// use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGuesser; /// use cryptatools_core::utils::alphabets::Alphabet; /// use cryptatools_core::utils::convert::Encode; /// @@ -60,7 +60,7 @@ impl CoincidenceIndexGuesser { /// ``` /// use once_cell::sync::Lazy; /// use cryptatools_core::utils::alphabets::Alphabet; - /// use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGuesser; + /// use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGuesser; /// use approx::assert_abs_diff_eq; /// /// let alphabet = Alphabet::new_empty().ascii_printable_only_encoding(); @@ -100,7 +100,7 @@ impl CoincidenceIndexGenerator { /// /// ``` /// use cryptatools_core::utils::{convert::Encode, alphabets::Alphabet}; - /// use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGenerator; + /// use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGenerator; /// /// use approx::assert_abs_diff_eq; /// @@ -141,7 +141,7 @@ impl CoincidenceIndexGenerator { /// ``` /// use once_cell::sync::Lazy; /// use cryptatools_core::utils::{convert::Encode, alphabets::Alphabet}; - /// use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGenerator; + /// use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGenerator; /// use approx::assert_abs_diff_eq; /// /// diff --git a/cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/frequency_analysis/distribution_algorithms/mod.rs b/cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/frequency_analysis/distribution_algorithms/mod.rs similarity index 100% rename from cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/frequency_analysis/distribution_algorithms/mod.rs rename to cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/frequency_analysis/distribution_algorithms/mod.rs diff --git a/cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/frequency_analysis/distribution_algorithms/statistical.rs b/cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/frequency_analysis/distribution_algorithms/statistical.rs similarity index 87% rename from cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/frequency_analysis/distribution_algorithms/statistical.rs rename to cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/frequency_analysis/distribution_algorithms/statistical.rs index 03b2a56f9f..4b13ede789 100644 --- a/cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/frequency_analysis/distribution_algorithms/statistical.rs +++ b/cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/frequency_analysis/distribution_algorithms/statistical.rs @@ -17,7 +17,7 @@ impl Statistical { /// Then divide the result by the cipher text size. /// ``` /// use std::collections::HashMap; - /// use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::frequency_analysis::distribution_algorithms::statistical::Statistical; + /// use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::frequency_analysis::distribution_algorithms::statistical::Statistical; /// use cryptatools_core::utils::alphabets::Alphabet; /// /// let ascii_alphabet = Alphabet::new_empty().ascii_encoding(); @@ -28,7 +28,7 @@ impl Statistical { /// /// ``` /// use std::collections::HashMap; - /// use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::frequency_analysis::distribution_algorithms::statistical::Statistical; + /// use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::frequency_analysis::distribution_algorithms::statistical::Statistical; /// use cryptatools_core::utils::alphabets::Alphabet; /// /// let ascii_alphabet = Alphabet::new_empty().ascii_encoding(); diff --git a/cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/frequency_analysis/mod.rs b/cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/frequency_analysis/mod.rs similarity index 100% rename from cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/frequency_analysis/mod.rs rename to cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/frequency_analysis/mod.rs diff --git a/cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/hash_cryptanalysis/birthday_paradox.rs b/cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/hash_cryptanalysis/birthday_paradox.rs similarity index 86% rename from cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/hash_cryptanalysis/birthday_paradox.rs rename to cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/hash_cryptanalysis/birthday_paradox.rs index 913a67d606..f1ca3d8105 100644 --- a/cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/hash_cryptanalysis/birthday_paradox.rs +++ b/cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/hash_cryptanalysis/birthday_paradox.rs @@ -27,8 +27,8 @@ impl BirthdayParadox { /// Take the len of the hash, /// /// ``` - /// use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGuesser; - /// use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::hash_cryptanalysis::birthday_paradox::BirthdayParadox; + /// use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGuesser; + /// use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::hash_cryptanalysis::birthday_paradox::BirthdayParadox; /// use cryptatools_core::utils::alphabets::Alphabet; /// use cryptatools_core::utils::convert::Encode; /// @@ -78,8 +78,8 @@ impl BirthdayParadox { /// Does not convert byte array to representation yet. /// /// ``` - /// use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGuesser; - /// use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::hash_cryptanalysis::birthday_paradox::BirthdayParadox; + /// use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGuesser; + /// use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::hash_cryptanalysis::birthday_paradox::BirthdayParadox; /// use cryptatools_core::utils::alphabets::Alphabet; /// use cryptatools_core::utils::convert::Encode; /// @@ -121,10 +121,10 @@ impl BirthdayParadox { /// Returns: the number of possible choices. /// /// ``` - /// use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGuesser; + /// use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGuesser; /// use cryptatools_core::utils::alphabets::Alphabet; /// use cryptatools_core::utils::convert::Encode; - /// use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::hash_cryptanalysis::birthday_paradox::BirthdayParadox; + /// use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::hash_cryptanalysis::birthday_paradox::BirthdayParadox; /// /// let ascii_alphabet = Alphabet::new_empty().ascii_printable_only_encoding(); /// let bp = BirthdayParadox::new(ascii_alphabet.into()); @@ -138,10 +138,10 @@ impl BirthdayParadox { /// Get number factorial. /// /// ``` - /// use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGuesser; + /// use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGuesser; /// use cryptatools_core::utils::alphabets::Alphabet; /// use cryptatools_core::utils::convert::Encode; - /// use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::hash_cryptanalysis::birthday_paradox::BirthdayParadox; + /// use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::hash_cryptanalysis::birthday_paradox::BirthdayParadox; /// /// let ascii_alphabet = Alphabet::new_empty().ascii_printable_only_encoding(); /// let bp = BirthdayParadox::new(ascii_alphabet.into()); diff --git a/cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/hash_cryptanalysis/mod.rs b/cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/hash_cryptanalysis/mod.rs similarity index 100% rename from cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/hash_cryptanalysis/mod.rs rename to cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/hash_cryptanalysis/mod.rs diff --git a/cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/mod.rs b/cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/mod.rs similarity index 100% rename from cryptatools-core/src/cryptanalysis/general_cryptanalysis_methods/mod.rs rename to cryptatools-core/src/cryptanalysis/custom/general_cryptanalysis_methods/mod.rs diff --git a/cryptatools-core/src/cryptanalysis/know_plaintext_attacks/matsui_s_algorithm/algorithm_one.rs b/cryptatools-core/src/cryptanalysis/custom/know_plaintext_attacks/matsui_s_algorithm/algorithm_one.rs similarity index 100% rename from cryptatools-core/src/cryptanalysis/know_plaintext_attacks/matsui_s_algorithm/algorithm_one.rs rename to cryptatools-core/src/cryptanalysis/custom/know_plaintext_attacks/matsui_s_algorithm/algorithm_one.rs diff --git a/cryptatools-core/src/cryptanalysis/know_plaintext_attacks/matsui_s_algorithm/mod.rs b/cryptatools-core/src/cryptanalysis/custom/know_plaintext_attacks/matsui_s_algorithm/mod.rs similarity index 100% rename from cryptatools-core/src/cryptanalysis/know_plaintext_attacks/matsui_s_algorithm/mod.rs rename to cryptatools-core/src/cryptanalysis/custom/know_plaintext_attacks/matsui_s_algorithm/mod.rs diff --git a/cryptatools-core/src/cryptanalysis/know_plaintext_attacks/mod.rs b/cryptatools-core/src/cryptanalysis/custom/know_plaintext_attacks/mod.rs similarity index 100% rename from cryptatools-core/src/cryptanalysis/know_plaintext_attacks/mod.rs rename to cryptatools-core/src/cryptanalysis/custom/know_plaintext_attacks/mod.rs diff --git a/cryptatools-core/src/cryptanalysis/custom/mod.rs b/cryptatools-core/src/cryptanalysis/custom/mod.rs new file mode 100644 index 0000000000..d32621627b --- /dev/null +++ b/cryptatools-core/src/cryptanalysis/custom/mod.rs @@ -0,0 +1,5 @@ +/// Differential Cryptanalysis +pub mod chosen_plain_text_attacks; +pub mod general_cryptanalysis_methods; +/// linear Cryptanalysis +pub mod know_plaintext_attacks; \ No newline at end of file diff --git a/cryptatools-core/src/cryptanalysis/mod.rs b/cryptatools-core/src/cryptanalysis/mod.rs index bfdf561e24..7dd804e982 100644 --- a/cryptatools-core/src/cryptanalysis/mod.rs +++ b/cryptatools-core/src/cryptanalysis/mod.rs @@ -1,6 +1,5 @@ pub mod plain_text_detector; -/// Differential Cryptanalysis -pub mod chosen_plain_text_attacks; -pub mod general_cryptanalysis_methods; -/// linear Cryptanalysis -pub mod know_plaintext_attacks; \ No newline at end of file +/// Non Custom Algos +pub mod common; +/// Custom Algos +pub mod custom; \ No newline at end of file diff --git a/cryptatools-core/src/lib.rs b/cryptatools-core/src/lib.rs index b0821723b9..b6279530a6 100644 --- a/cryptatools-core/src/lib.rs +++ b/cryptatools-core/src/lib.rs @@ -5,8 +5,8 @@ pub mod utils; use crate::utils::alphabets::{Encoding, Alphabet, split_bytes_by_characters_representation, uniffy_opcode_group}; use crate::cryptography::classical::encryption::monoalphabetic_ciphers::caesar_number::CaesarNumberAlgorithm; use crate::cryptography::classical::encryption::transpositional_ciphers::columnar_transposition::ColumnarTranspositionAlgorithm; -use crate::cryptanalysis::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGuesser; -use crate::cryptanalysis::general_cryptanalysis_methods::hash_cryptanalysis::birthday_paradox::BirthdayParadox; +use crate::cryptanalysis::custom::general_cryptanalysis_methods::frequency_analysis::coincidence_index::CoincidenceIndexGuesser; +use crate::cryptanalysis::custom::general_cryptanalysis_methods::hash_cryptanalysis::birthday_paradox::BirthdayParadox; uniffi_macros::include_scaffolding!("cryptatools"); \ No newline at end of file diff --git a/doc-examples/ethereum-colision-evaluation/src/main.rs b/doc-examples/ethereum-colision-evaluation/src/main.rs index 9f23624857..6f494b8998 100644 --- a/doc-examples/ethereum-colision-evaluation/src/main.rs +++ b/doc-examples/ethereum-colision-evaluation/src/main.rs @@ -1,7 +1,7 @@ use ethers::prelude::*; use cryptatools_core::utils::alphabets::Alphabet; -use cryptatools_core::cryptanalysis::general_cryptanalysis_methods::hash_cryptanalysis::birthday_paradox::BirthdayParadox; +use cryptatools_core::cryptanalysis::custom::general_cryptanalysis_methods::hash_cryptanalysis::birthday_paradox::BirthdayParadox; const WSS_URL: &str = "wss://mainnet.infura.io/ws/v3/c60b0bb42f8a4c6481ecd229eddaca27";