Commit 04b2db3
authored
Blowfish OFB Block Cipher Mode Support (#2892)
### Description of changes:
* Users of PyCA cryptography are not able to use Blowfish for their
legacy use cases, as we forgot to remove the `OPENSSL_NO_BF` define when
we re-added support for these decrepit algorithms.
* Blowfish was missing the OFB block cipher mode implementation that was
present in OpenSSL. I have brought this implementation over and updated
the types and function signatures. Which is also a mode support by PyCA
cryptography.
### Testing:
There doesn't really appear to be much extensive OFB KATs available, so
I've extended the current test data using the OpenSSL 1.1.1 APIs:
```
$ echo -n "plaintextHexStr" | xxd -p -r > plaintext.txt
$ openssl enc -bf-ofb -in plaintext.txt -out ciphertext -K <keyHex> -iv <ivHex>
$ xxd -i < ciphertext
```
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.1 parent f5e4585 commit 04b2db3
File tree
46 files changed
+642
-2
lines changed- crypto/decrepit/blowfish
- fuzz
- blowfish_corpus
- include/openssl
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
46 files changed
+642
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
| 513 | + | |
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
565 | 612 | | |
566 | 613 | | |
567 | 614 | | |
| |||
600 | 647 | | |
601 | 648 | | |
602 | 649 | | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
603 | 659 | | |
604 | 660 | | |
605 | 661 | | |
| |||
635 | 691 | | |
636 | 692 | | |
637 | 693 | | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
638 | 705 | | |
639 | 706 | | |
640 | 707 | | |
641 | 708 | | |
642 | 709 | | |
643 | 710 | | |
644 | 711 | | |
| 712 | + | |
| 713 | + | |
0 commit comments