diff options
Diffstat (limited to 'src/lib/libcrypto/camellia/camellia.c')
| -rw-r--r-- | src/lib/libcrypto/camellia/camellia.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/libcrypto/camellia/camellia.c b/src/lib/libcrypto/camellia/camellia.c index af6b85ff8e..94e81a4773 100644 --- a/src/lib/libcrypto/camellia/camellia.c +++ b/src/lib/libcrypto/camellia/camellia.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: camellia.c,v 1.13 2024/03/29 07:26:21 jsing Exp $ */ | 1 | /* $OpenBSD: camellia.c,v 1.14 2024/03/30 04:58:12 joshua Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . | 3 | * Copyright 2006 NTT (Nippon Telegraph and Telephone Corporation) . |
| 4 | * ALL RIGHTS RESERVED. | 4 | * ALL RIGHTS RESERVED. |
| @@ -591,6 +591,7 @@ Camellia_set_key(const unsigned char *userKey, const int bits, | |||
| 591 | key->grand_rounds = Camellia_Ekeygen(bits, userKey, key->u.rd_key); | 591 | key->grand_rounds = Camellia_Ekeygen(bits, userKey, key->u.rd_key); |
| 592 | return 0; | 592 | return 0; |
| 593 | } | 593 | } |
| 594 | LCRYPTO_ALIAS(Camellia_set_key); | ||
| 594 | 595 | ||
| 595 | void | 596 | void |
| 596 | Camellia_encrypt(const unsigned char *in, unsigned char *out, | 597 | Camellia_encrypt(const unsigned char *in, unsigned char *out, |
| @@ -598,6 +599,7 @@ Camellia_encrypt(const unsigned char *in, unsigned char *out, | |||
| 598 | { | 599 | { |
| 599 | Camellia_EncryptBlock_Rounds(key->grand_rounds, in, key->u.rd_key, out); | 600 | Camellia_EncryptBlock_Rounds(key->grand_rounds, in, key->u.rd_key, out); |
| 600 | } | 601 | } |
| 602 | LCRYPTO_ALIAS(Camellia_encrypt); | ||
| 601 | 603 | ||
| 602 | void | 604 | void |
| 603 | Camellia_decrypt(const unsigned char *in, unsigned char *out, | 605 | Camellia_decrypt(const unsigned char *in, unsigned char *out, |
| @@ -605,6 +607,7 @@ Camellia_decrypt(const unsigned char *in, unsigned char *out, | |||
| 605 | { | 607 | { |
| 606 | Camellia_DecryptBlock_Rounds(key->grand_rounds, in, key->u.rd_key, out); | 608 | Camellia_DecryptBlock_Rounds(key->grand_rounds, in, key->u.rd_key, out); |
| 607 | } | 609 | } |
| 610 | LCRYPTO_ALIAS(Camellia_decrypt); | ||
| 608 | 611 | ||
| 609 | void | 612 | void |
| 610 | Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len, | 613 | Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len, |
| @@ -617,6 +620,7 @@ Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len, | |||
| 617 | CRYPTO_cbc128_decrypt(in, out, len, key, ivec, | 620 | CRYPTO_cbc128_decrypt(in, out, len, key, ivec, |
| 618 | (block128_f)Camellia_decrypt); | 621 | (block128_f)Camellia_decrypt); |
| 619 | } | 622 | } |
| 623 | LCRYPTO_ALIAS(Camellia_cbc_encrypt); | ||
| 620 | 624 | ||
| 621 | /* | 625 | /* |
| 622 | * The input and output encrypted as though 128bit cfb mode is being | 626 | * The input and output encrypted as though 128bit cfb mode is being |
| @@ -632,6 +636,7 @@ Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out, | |||
| 632 | CRYPTO_cfb128_encrypt(in, out, length, key, ivec, num, enc, | 636 | CRYPTO_cfb128_encrypt(in, out, length, key, ivec, num, enc, |
| 633 | (block128_f)Camellia_encrypt); | 637 | (block128_f)Camellia_encrypt); |
| 634 | } | 638 | } |
| 639 | LCRYPTO_ALIAS(Camellia_cfb128_encrypt); | ||
| 635 | 640 | ||
| 636 | /* N.B. This expects the input to be packed, MS bit first */ | 641 | /* N.B. This expects the input to be packed, MS bit first */ |
| 637 | void | 642 | void |
| @@ -642,6 +647,7 @@ Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out, | |||
| 642 | CRYPTO_cfb128_1_encrypt(in, out, length, key, ivec, num, enc, | 647 | CRYPTO_cfb128_1_encrypt(in, out, length, key, ivec, num, enc, |
| 643 | (block128_f)Camellia_encrypt); | 648 | (block128_f)Camellia_encrypt); |
| 644 | } | 649 | } |
| 650 | LCRYPTO_ALIAS(Camellia_cfb1_encrypt); | ||
| 645 | 651 | ||
| 646 | void | 652 | void |
| 647 | Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out, | 653 | Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out, |
| @@ -651,6 +657,7 @@ Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out, | |||
| 651 | CRYPTO_cfb128_8_encrypt(in, out, length, key, ivec, num, enc, | 657 | CRYPTO_cfb128_8_encrypt(in, out, length, key, ivec, num, enc, |
| 652 | (block128_f)Camellia_encrypt); | 658 | (block128_f)Camellia_encrypt); |
| 653 | } | 659 | } |
| 660 | LCRYPTO_ALIAS(Camellia_cfb8_encrypt); | ||
| 654 | 661 | ||
| 655 | void | 662 | void |
| 656 | Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out, | 663 | Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out, |
| @@ -661,6 +668,7 @@ Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out, | |||
| 661 | CRYPTO_ctr128_encrypt(in, out, length, key, ivec, ecount_buf, num, | 668 | CRYPTO_ctr128_encrypt(in, out, length, key, ivec, ecount_buf, num, |
| 662 | (block128_f)Camellia_encrypt); | 669 | (block128_f)Camellia_encrypt); |
| 663 | } | 670 | } |
| 671 | LCRYPTO_ALIAS(Camellia_ctr128_encrypt); | ||
| 664 | 672 | ||
| 665 | void | 673 | void |
| 666 | Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out, | 674 | Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out, |
| @@ -671,6 +679,7 @@ Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out, | |||
| 671 | else | 679 | else |
| 672 | Camellia_decrypt(in, out, key); | 680 | Camellia_decrypt(in, out, key); |
| 673 | } | 681 | } |
| 682 | LCRYPTO_ALIAS(Camellia_ecb_encrypt); | ||
| 674 | 683 | ||
| 675 | /* | 684 | /* |
| 676 | * The input and output encrypted as though 128bit ofb mode is being | 685 | * The input and output encrypted as though 128bit ofb mode is being |
| @@ -684,3 +693,4 @@ Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out, | |||
| 684 | CRYPTO_ofb128_encrypt(in, out, length, key, ivec, num, | 693 | CRYPTO_ofb128_encrypt(in, out, length, key, ivec, num, |
| 685 | (block128_f)Camellia_encrypt); | 694 | (block128_f)Camellia_encrypt); |
| 686 | } | 695 | } |
| 696 | LCRYPTO_ALIAS(Camellia_ofb128_encrypt); | ||
