Skip to content

Commit e9f7c4f

Browse files
committed
mention API usage example on readme
Signed-off-by: Anjan Roy <[email protected]>
1 parent 6862eeb commit e9f7c4f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

+30
Original file line numberDiff line numberDiff line change
@@ -397,3 +397,33 @@ bench_elephant::delirium_decrypt/32/2048 260364 ns 260362 ns
397397
bench_elephant::delirium_encrypt/32/4096 512829 ns 512786 ns 1365 bytes_per_second=7.67722M/s
398398
bench_elephant::delirium_decrypt/32/4096 512671 ns 512642 ns 1366 bytes_per_second=7.67937M/s
399399
```
400+
401+
## Usage
402+
403+
Elephant is a zero-dependency, header-only C++ library ( with additional support for C wrapper [interface](wrapper/elephant.cpp), which is used for generating shared library object with C-ABI ), which can be pretty easily used in your project.
404+
405+
There are three AEAD schemes in Elephant cipher suite, which are implemented here. All of them have common `encrypt`/ `decrypt` interfaces, just one difference to note that, Delirium uses 16 -bytes authentication tag, while both Dumbo & Jumbo uses 8 -bytes authentication tag.
406+
407+
Scheme | Namespace | Header
408+
--- | --- | ---
409+
Dumbo AEAD | `dumbo::` | [dumbo.hpp](./include/dumbo.hpp)
410+
Jumbo AEAD | `jumbo::` | [jumbo.hpp](./include/jumbo.hpp)
411+
Delirium AEAD | `delirium::` | [delirium.hpp](./include/delirium.hpp)
412+
413+
I keep usage example of Dumbo, Jumbo & Delirium AEAD
414+
415+
- [Dumbo](./example/dumbo.cpp)
416+
- [Jumbo](./example/jumbo.cpp)
417+
- [Delirium](./example/delirium.cpp)
418+
419+
```bash
420+
Dumbo AEAD
421+
422+
Key : 4ea28a82a329104a5f32b31dbb3a8f04
423+
Nonce : 9dc8e14a149ab54744b2159b
424+
Data : 76d53bd2945b8f9c7b22cbec6a7ff9d0fad3e37bd6b1288eb860124539852932
425+
Text : 04cd0f374ea2224945b301b302ce3fea68803c76a7944fbabebe1e9e2102d9c6
426+
Encrypted : 48a9807d4178baccaf0fc7ecd9a4a625217e67457b0671cc4e540a92db4a41f8
427+
Decrypted : 04cd0f374ea2224945b301b302ce3fea68803c76a7944fbabebe1e9e2102d9c6
428+
Tag : e594cf2b6a7db6c0
429+
```

0 commit comments

Comments
 (0)