| | | | |
| Offset 583, 52 lines modified | Offset 583, 36 lines modified |
| 583 | ·*·distributed·under·the·License·is·distributed·on·an·"AS·IS"·BASIS, | 583 | ·*·distributed·under·the·License·is·distributed·on·an·"AS·IS"·BASIS, |
| 584 | ·*·WITHOUT·WARRANTIES·OR·CONDITIONS·OF·ANY·KIND,·either·express·or·implied. | 584 | ·*·WITHOUT·WARRANTIES·OR·CONDITIONS·OF·ANY·KIND,·either·express·or·implied. |
| 585 | ·*·See·the·License·for·the·specific·language·governing·permissions·and | 585 | ·*·See·the·License·for·the·specific·language·governing·permissions·and |
| 586 | ·*·limitations·under·the·License. | 586 | ·*·limitations·under·the·License. |
| 587 | ·*/ | 587 | ·*/ |
| | |
| 588 | #ifdef·SODIUM_LIBRARY_MINIMAL | 588 | #ifdef·SODIUM_LIBRARY_MINIMAL |
| | 589 | static·const·int·PYNACL_HAS_CRYPTO_CORE_ED25519·=·0; |
| 589 | static·const·int·PYNACL_HAS_CRYPTO_PWHASH_SCRYPTSALSA208SHA256·=·0; | |
| | |
| 590 | size_t·(*crypto_pwhash_scryptsalsa208sha256_saltbytes)(void)·=·NULL; | |
| 591 | size_t·(*crypto_pwhash_scryptsalsa208sha256_strbytes)(void)·=·NULL; | |
| 592 | size_t·(*crypto_pwhash_scryptsalsa208sha256_bytes_min)(void)·=·NULL; | |
| 593 | size_t·(*crypto_pwhash_scryptsalsa208sha256_bytes_max)(void)·=·NULL; | |
| 594 | size_t·(*crypto_pwhash_scryptsalsa208sha256_passwd_min)(void)·=·NULL; | |
| 595 | size_t·(*crypto_pwhash_scryptsalsa208sha256_passwd_max)(void)·=·NULL; | |
| 596 | size_t·(*crypto_pwhash_scryptsalsa208sha256_opslimit_min)(void)·=·NULL; | |
| 597 | size_t·(*crypto_pwhash_scryptsalsa208sha256_opslimit_max)(void)·=·NULL; | |
| 598 | size_t·(*crypto_pwhash_scryptsalsa208sha256_memlimit_min)(void)·=·NULL; | |
| 599 | size_t·(*crypto_pwhash_scryptsalsa208sha256_memlimit_max)(void)·=·NULL; | |
| 600 | size_t·(*crypto_pwhash_scryptsalsa208sha256_opslimit_interactive)(void)·=·NULL; | |
| 601 | size_t·(*crypto_pwhash_scryptsalsa208sha256_memlimit_interactive)(void)·=·NULL; | |
| 602 | size_t·(*crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive)(void)·=·NULL; | |
| 603 | size_t·(*crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive)(void)·=·NULL; | |
| | |
| 604 | const·char·*(*crypto_pwhash_scryptsalsa208sha256_strprefix)(void)·=·NULL; | |
| | |
| | 590 | size_t·(*crypto_core_ed25519_bytes)()·=·NULL; |
| | 591 | size_t·(*crypto_core_ed25519_scalarbytes)(void)·=·NULL; |
| | 592 | size_t·(*crypto_core_ed25519_nonreducedscalarbytes)(void)·=·NULL; |
| 605 | int·(*crypto_pwhash_scryptsalsa208sha256_ll)(const·uint8_t·*·const, | |
| 606 | ··············································size_t, | |
| 607 | ··············································const·uint8_t·*, | |
| 608 | ··············································size_t, | |
| 609 | ··············································uint64_t,·uint32_t,·uint32_t, | |
| 610 | ··············································uint8_t·*,·size_t)·=·NULL; | |
| | |
| | 593 | int·(*crypto_core_ed25519_is_valid_point)(const·unsigned·char·*)·=·NULL; |
| | 594 | int·(*crypto_core_ed25519_add)(unsigned·char·*,·const·unsigned·char·*,·const·unsigned·char·*)·=·NULL; |
| | 595 | int·(*crypto_core_ed25519_sub)(unsigned·char·*,·const·unsigned·char·*,·const·unsigned·char·*)·=·NULL; |
| 611 | /*·#define·crypto_pwhash_scryptsalsa208sha256_STRBYTES·102·*/ | |
| 612 | int·(*crypto_pwhash_scryptsalsa208sha256_str)(char·[102], | |
| 613 | ···············································const·char·*·const, | |
| 614 | ···············································unsigned·long·long, | |
| 615 | ···············································unsigned·long·long, | |
| 616 | ···············································size_t)·=·NULL; | |
| | |
| 617 | int·(*crypto_pwhash_scryptsalsa208sha256_str_verify)(const·char·[102], | |
| 618 | ······················································const·char·*·const, | 596 | int·(*crypto_core_ed25519_scalar_invert)(unsigned·char·*,·const·unsigned·char·*)·=·NULL; |
| | 597 | void·(*crypto_core_ed25519_scalar_negate)(unsigned·char·*,·const·unsigned·char·*)·=·NULL; |
| | 598 | void·(*crypto_core_ed25519_scalar_complement)(unsigned·char·*,·const·unsigned·char·*)·=·NULL; |
| | 599 | void·(*crypto_core_ed25519_scalar_add)(unsigned·char·*,·const·unsigned·char·*, |
| 619 | ······················································unsigned·long·long)·=·NULL; | 600 | ·······································const·unsigned·char·*)·=·NULL; |
| | 601 | void·(*crypto_core_ed25519_scalar_sub)(unsigned·char·*,·const·unsigned·char·*, |
| | 602 | ·······································const·unsigned·char·*)·=·NULL; |
| | 603 | void·(*crypto_core_ed25519_scalar_mul)(unsigned·char·*,·const·unsigned·char·*, |
| | 604 | ·······································const·unsigned·char·*)·=·NULL; |
| | 605 | void·(*crypto_core_ed25519_scalar_reduce)(unsigned·char·*,·const·unsigned·char·*)·=·NULL; |
| 620 | #else | 606 | #else |
| 621 | static·const·int·PYNACL_HAS_CRYPTO_PWHASH_SCRYPTSALSA208SHA256·=·1; | 607 | static·const·int·PYNACL_HAS_CRYPTO_CORE_ED25519·=·1; |
| 622 | #endif | 608 | #endif |
| | |
| 623 | /*·Copyright·2020·Donald·Stufft·and·individual·contributors | 609 | /*·Copyright·2020·Donald·Stufft·and·individual·contributors |
| 624 | ·* | 610 | ·* |
| 625 | ·*·Licensed·under·the·Apache·License,·Version·2.0·(the·"License"); | 611 | ·*·Licensed·under·the·Apache·License,·Version·2.0·(the·"License"); |
| 626 | ·*·you·may·not·use·this·file·except·in·compliance·with·the·License. | 612 | ·*·you·may·not·use·this·file·except·in·compliance·with·the·License. |
| 627 | ·*·You·may·obtain·a·copy·of·the·License·at | 613 | ·*·You·may·obtain·a·copy·of·the·License·at |
| Offset 696, 36 lines modified | Offset 680, 52 lines modified |
| 696 | ·*·distributed·under·the·License·is·distributed·on·an·"AS·IS"·BASIS, | 680 | ·*·distributed·under·the·License·is·distributed·on·an·"AS·IS"·BASIS, |
| 697 | ·*·WITHOUT·WARRANTIES·OR·CONDITIONS·OF·ANY·KIND,·either·express·or·implied. | 681 | ·*·WITHOUT·WARRANTIES·OR·CONDITIONS·OF·ANY·KIND,·either·express·or·implied. |
| 698 | ·*·See·the·License·for·the·specific·language·governing·permissions·and | 682 | ·*·See·the·License·for·the·specific·language·governing·permissions·and |
| 699 | ·*·limitations·under·the·License. | 683 | ·*·limitations·under·the·License. |
| 700 | ·*/ | 684 | ·*/ |
| | |
| 701 | #ifdef·SODIUM_LIBRARY_MINIMAL | 685 | #ifdef·SODIUM_LIBRARY_MINIMAL |
| 702 | static·const·int·PYNACL_HAS_CRYPTO_CORE_ED25519·=·0; | 686 | static·const·int·PYNACL_HAS_CRYPTO_PWHASH_SCRYPTSALSA208SHA256·=·0; |
| | |
| 703 | size_t·(*crypto_core_ed25519_bytes)()·=·NULL; | |
| 704 | size_t·(*crypto_core_ed25519_scalarbytes)(void)·=·NULL; | |
| 705 | size_t·(*crypto_core_ed25519_nonreducedscalarbytes)(void)·=·NULL; | 687 | size_t·(*crypto_pwhash_scryptsalsa208sha256_saltbytes)(void)·=·NULL; |
| | 688 | size_t·(*crypto_pwhash_scryptsalsa208sha256_strbytes)(void)·=·NULL; |
| | 689 | size_t·(*crypto_pwhash_scryptsalsa208sha256_bytes_min)(void)·=·NULL; |
| | 690 | size_t·(*crypto_pwhash_scryptsalsa208sha256_bytes_max)(void)·=·NULL; |
| | 691 | size_t·(*crypto_pwhash_scryptsalsa208sha256_passwd_min)(void)·=·NULL; |
| | 692 | size_t·(*crypto_pwhash_scryptsalsa208sha256_passwd_max)(void)·=·NULL; |
| | 693 | size_t·(*crypto_pwhash_scryptsalsa208sha256_opslimit_min)(void)·=·NULL; |
| | 694 | size_t·(*crypto_pwhash_scryptsalsa208sha256_opslimit_max)(void)·=·NULL; |
| | 695 | size_t·(*crypto_pwhash_scryptsalsa208sha256_memlimit_min)(void)·=·NULL; |
| | 696 | size_t·(*crypto_pwhash_scryptsalsa208sha256_memlimit_max)(void)·=·NULL; |
| | 697 | size_t·(*crypto_pwhash_scryptsalsa208sha256_opslimit_interactive)(void)·=·NULL; |
| | 698 | size_t·(*crypto_pwhash_scryptsalsa208sha256_memlimit_interactive)(void)·=·NULL; |
| | 699 | size_t·(*crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive)(void)·=·NULL; |
| | 700 | size_t·(*crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive)(void)·=·NULL; |
| | |
| | 701 | const·char·*(*crypto_pwhash_scryptsalsa208sha256_strprefix)(void)·=·NULL; |
| 706 | int·(*crypto_core_ed25519_is_valid_point)(const·unsigned·char·*)·=·NULL; | |
| 707 | int·(*crypto_core_ed25519_add)(unsigned·char·*,·const·unsigned·char·*,·const·unsigned·char·*)·=·NULL; | |
| 708 | int·(*crypto_core_ed25519_sub)(unsigned·char·*,·const·unsigned·char·*,·const·unsigned·char·*)·=·NULL; | |
| | |
| 709 | int·(*crypto_core_ed25519_scalar_invert)(unsigned·char·*,·const·unsigned·char·*)·=·NULL; | |
| 710 | void·(*crypto_core_ed25519_scalar_negate)(unsigned·char·*,·const·unsigned·char·*)·=·NULL; | |
| 711 | void·(*crypto_core_ed25519_scalar_complement)(unsigned·char·*,·const·unsigned·char·*)·=·NULL; | |
| 712 | void·(*crypto_core_ed25519_scalar_add)(unsigned·char·*,·const·unsigned·char·*, | 702 | int·(*crypto_pwhash_scryptsalsa208sha256_ll)(const·uint8_t·*·const, |
| | 703 | ··············································size_t, |
| | 704 | ··············································const·uint8_t·*, |
| | 705 | ··············································size_t, |
| | 706 | ··············································uint64_t,·uint32_t,·uint32_t, |
| | 707 | ··············································uint8_t·*,·size_t)·=·NULL; |
| | |
| | 708 | /*·#define·crypto_pwhash_scryptsalsa208sha256_STRBYTES·102·*/ |
| | 709 | int·(*crypto_pwhash_scryptsalsa208sha256_str)(char·[102], |
| | 710 | ···············································const·char·*·const, |
| | 711 | ···············································unsigned·long·long, |
| | 712 | ···············································unsigned·long·long, |
| 713 | ·······································const·unsigned·char·*)·=·NULL; | 713 | ···············································size_t)·=·NULL; |
| 714 | void·(*crypto_core_ed25519_scalar_sub)(unsigned·char·*,·const·unsigned·char·*, | |
| | 714 | int·(*crypto_pwhash_scryptsalsa208sha256_str_verify)(const·char·[102], |
| | 715 | ······················································const·char·*·const, |
| 715 | ·······································const·unsigned·char·*)·=·NULL; | 716 | ······················································unsigned·long·long)·=·NULL; |
| 716 | void·(*crypto_core_ed25519_scalar_mul)(unsigned·char·*,·const·unsigned·char·*, | |
| 717 | ·······································const·unsigned·char·*)·=·NULL; | |
| 718 | void·(*crypto_core_ed25519_scalar_reduce)(unsigned·char·*,·const·unsigned·char·*)·=·NULL; | |
| 719 | #else | 717 | #else |
| 720 | static·const·int·PYNACL_HAS_CRYPTO_CORE_ED25519·=·1; | 718 | static·const·int·PYNACL_HAS_CRYPTO_PWHASH_SCRYPTSALSA208SHA256·=·1; |
| 721 | #endif | 719 | #endif |
| | |
| | |
| 722 | /************************************************************/ | 720 | /************************************************************/ |
| | |
| 723 | static·void·*_cffi_types[]·=·{ | 721 | static·void·*_cffi_types[]·=·{ |
| 724 | /*··0·*/·_CFFI_OP(_CFFI_OP_FUNCTION,·4),·//·char·const·*()(void) | 722 | /*··0·*/·_CFFI_OP(_CFFI_OP_FUNCTION,·4),·//·char·const·*()(void) |