I've got an encryption module used in a system I can't change. The module does some byte ordering etc. and uses then Speck cipher with PCBC mode (not implemented in Java codes I found by quick search) We're working on a Java service to communicate with these, so I would need a compatible implementation in Java.
Attached is a Python code that contains the code. I need the encrypt_message() and decrypt_message() that are fully compatible with these, so a few unit tests with different message lengths are needed.
1. Compatible Java code in a class or two (may use BSD/MIT/Apache licensed code, as long as no large external dependencies are needed).
2. Unit tests with 1, 4, 8, 64 byte payloads for both Python and Java (create encrypted message with Python code and use those in Java unit tests).
To filter necessary expertise and autobidding bots: what is PCBC mode in this context ?