Skip to content

Commit ebfdbd2

Browse files
committedMar 15, 2024
Force the static linking
Readme typo fix
2 parents 770633b + e09e429 commit ebfdbd2

File tree

3 files changed

+169
-163
lines changed

3 files changed

+169
-163
lines changed
 

‎CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ project(OceanKeyak C)
66
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
77

88
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
9-
9+
set(sodium_USE_STATIC_LIBS ON)
1010
find_package(Sodium REQUIRED)
1111

1212
################################################################################

‎README.md

+16-18
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
An cross-platform file encryption tool with AE scheme extracted from XKCP(eXtended Keccak Code Package)
33
* [`Keyak`](https://github.com/XKCP/XKCP/blob/master/doc/Keyak-documentation.h), the authenticated encryption schemes River, Lake, Sea, Ocean and Lunar Keyak.This repo only extracts the OceanKeyak
44

5-
# Dependencies
5+
## Dependencies
66

7-
## CMake
7+
### CMake
88

9-
Keyak requires CMake 3.10.0 or newer in order to take advantage of improved support. If you're using Ubuntu 18.04 or newer you should already have a suitable version. If you're using an older distribution (e.g. 16.04) you will need to install a compatible version of CMake yourself. Also, Keyak utilizes the libsodium api to generate unpredictable data, suitable for creating secret keys, so you should install [libsodium](https://download.libsodium.org/libsodium/releases/) into your system path if you are using linux distribution, or if you are using windows, you can type the following commad to set the sodium_DIR environment variable to point at the directory of pre-built libsodium from official website.
9+
Keyak requires CMake 3.10.0 or newer in order to take advantage of improved support. If you're using Ubuntu 18.04 or newer you should already have a suitable version. If you're using an older distribution (e.g. 16.04) you will need to install a compatible version of CMake yourself.
10+
11+
### libsodium
12+
13+
Also, Keyak utilizes the libsodium api to generate unpredictable data, suitable for creating secret keys, so you should install [libsodium](https://download.libsodium.org/libsodium/releases/) into your system path if you are using linux distribution, or if you are using windows, you can type the following commad to set the sodium_DIR environment variable to point at the directory of pre-built libsodium from official website.
1014

1115
```cmd
1216
set sodium_DIR path_to_pre-built_lib
@@ -18,7 +22,7 @@ To install libsodium on Linux:
1822
sudo apt install libsodium-dev
1923
```
2024

21-
# Build
25+
## Build
2226

2327
Clone the code and change into the source code directory
2428

@@ -29,39 +33,33 @@ git clone https://github.com/qnfm/Standalone-OceanKeyak && cd Standalone-OceanKe
2933
If you have downloaded the ninja_build binary on Windows, the build command is:
3034

3135
```bash
32-
cmake "-DCMAKE_MAKE_PROGRAM=C:/path_to_ninja/ninja.exe" -G Ninja -S . -B cmake-build-debug -Dsodium_USE_STATIC_LIBS=ON
36+
cmake "-DCMAKE_MAKE_PROGRAM=C:/path_to_ninja/ninja.exe" -G Ninja -S . -B build
3337
```
3438

3539
Or run build without ninja:
3640

3741
```bash
38-
cmake -S . -B cmake-build-debug -Dsodium_USE_STATIC_LIBS=ON
42+
cmake -S . -B build
3943
```
4044

4145
Final step: link the program:
4246

4347
```bash
44-
cmake --build cmake-build-debug --target Keyak -j 8
48+
cmake --build build --target Keyak -j 8
4549
```
4650

47-
The binary is located in the cmake-build-debug/Release|Debug directory on Windows and cmake-build-debug/ directory on linux
51+
The binary is located in the build/ directory
4852

49-
# Usage
53+
## Usage
5054

51-
To encrypt, you simply need to provide thepath to the filename, remember to keep the generated two files safely and secretly. If you lose these two file (one with .key surfix and the other with .Keyak surfix), the original file will be lost forever !
55+
To encrypt, you simply need to provide the path to the filename, remember to keep the generated two files (one with `.key` surfix is the secret key and the other with `.Keyak` surfix is the encrypted file) safely and secretly. If you lose these two file , the original file will be lost forever!
5256

53-
```
57+
```bash
5458
Keyak file_to_be_encrypted
5559
```
5660

5761
To decrypt, put the two output files at the same directory and simply call:
5862

59-
```
63+
```bash
6064
Keyak path_to_key.key path_to_ciphertext.Keyak
6165
```
62-
63-
# Under which license is the XKCP distributed?
64-
65-
Most of the source and header files in the XKCP are released to the **public domain** and associated to the [CC0](http://creativecommons.org/publicdomain/zero/1.0/) deed. The exceptions are the following:
66-
67-
* [`brg_endian.h`](lib/common/brg_endian.h) is copyrighted by Brian Gladman and comes with a BSD 3-clause license;

0 commit comments

Comments
 (0)