Skip to content
This repository was archived by the owner on Jan 1, 2025. It is now read-only.

Commit b07ee40

Browse files
committed
Merge branch 'dev'
2 parents c47910f + 43098ff commit b07ee40

17 files changed

Lines changed: 31 additions & 55 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.26.0)
22

33
project(libpgfe
4-
VERSION 0.7.0
4+
VERSION 0.7.1
55
DESCRIPTION "Cryptographic library"
66
HOMEPAGE_URL "https://github.com/chardon55/libpgfe"
77
LANGUAGES C CXX

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# libpgfe
1+
# libpgfe (Legacy C/C++ edition)
22

33
![Version](https://img.shields.io/github/v/tag/chardon55/libpgfe?color=brightgreen&label=version)
44
![License](https://img.shields.io/github/license/chardon55/libpgfe)

include/libpgfe/version.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
1-
/*
2-
libpgfe
3-
version.h
4-
5-
Copyright (c) 2022-2023 Charles Dong
6-
*/
7-
81
#ifndef LIBPGFE_VERSION_H
92
#define LIBPGFE_VERSION_H
103

114
#define LIBPGFE_MAJOR_VERSION 0
125
#define LIBPGFE_MINOR_VERSION 7
13-
#define LIBPGFE_REVISION 0
6+
#define LIBPGFE_REVISION 1
147
#define LIBPGFE_VARIANT ""
158

16-
#define LIBPGFE_VERSION "0.7.0"
9+
#define LIBPGFE_VERSION "0.7.1"
1710

1811
#endif

metadata.mak

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
PROJECT := libpgfe
2-
VERSION := 0.7.0
2+
VERSION := 0.7.1
33

44
BUILD_DIR := build
55

66
INCLUDE_DIR := include
77
SRC_DIR := src
88

9-
HEADER_DIR := /usr/local/include/libpgfe
9+
HEADER_DIR := /usr/local/include
1010
LIB_DIR := /usr/lib
1111
TARGET_DIR := $(BUILD_DIR)
1212
TARGET_FILE := $(PROJECT).so

project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"name": "libpgfe",
3-
"version": "0.7.0"
3+
"version": "0.7.1"
44
}

scripts/metadata.mak.in

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ BUILD_DIR := build
66
INCLUDE_DIR := include
77
SRC_DIR := src
88

9-
HEADER_DIR := /usr/local/include/libpgfe
9+
HEADER_DIR := /usr/local/include
1010
LIB_DIR := /usr/lib
1111
TARGET_DIR := $(BUILD_DIR)
1212
TARGET_FILE := $(PROJECT).so
1313

1414
TARGET := $(TARGET_DIR)/$(TARGET_FILE)
15-
TEST_TARGET := $(TARGET_DIR)/$(TEST_BIN)
15+
TEST_TARGET := $(TARGET_DIR)/$(TEST_BIN)
16+
17+
DEFAULT_CMAKE_TOOLCHAIN_FILE := ./cmake/toolchains/x86_64-linux-gnu-clang.cmake
18+
19+
NDK_ROOT := ~/Android/Sdk/ndk/23.1.7779620/

scripts/update_meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
FILES = {
77
"scripts/metadata.mak.in": "metadata.mak",
8-
"scripts/version.h.template": "include/version.h",
8+
"scripts/version.h.template": "include/libpgfe/version.h",
99
}
1010

1111

src/fishes/blowfish.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ Blowfish::Blowfish(const pgfe_encode_t *key, size_t length) {
2222

2323
Blowfish::Blowfish(const std::string &key) : Blowfish(key.c_str()) {}
2424

25-
Blowfish::~Blowfish() {
26-
memset(&ctx, 0, sizeof(ctx));
27-
}
25+
Blowfish::~Blowfish() {}
2826

2927
SequentialData Blowfish::encrypt(const pgfe_encode_t *seq, size_t length) {
3028
size_t sz = length + length % 8;

src/hashes/keccak-backend.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ static void transform(pgfe_keccak_bitcube_t A, uint64_t RC) {
6363
}
6464
}
6565

66-
// Wipe sensitive data from RAM
67-
memset(C, 0, 40);
68-
6966
// Iota
7067
A[0][0] ^= RC;
7168
}

src/hashes/md5-backend.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,4 @@ void md5_transform(pgfe_word_t state[4], const pgfe_encode_t block[64]) {
108108
state[1] += buf[2]; // b
109109
state[2] += buf[1]; // c
110110
state[3] += buf[0]; // d
111-
112-
// Wipe sensitive data from the RAM
113-
memset(x, 0, sizeof(x));
114-
memset(buf, 0, 16);
115111
}

0 commit comments

Comments
 (0)