Eccpem
Generating, writing, and reading Elliptic Curve Cryptography private and public keys to and from PEM files in C/C++.
Install / Use
/learn @baloian/EccpemREADME
ECCPEM
Do you want to generate Elliptic Curve Cryptography (ECC) key pairs (public and private keys), write them to a .PEM file, or read them from a .PEM file in C/C++ programming languages?
The ECCPEM library makes it super easy by invoking just one function and the job is done!
Build
Before installing the project, make sure you have installed the minimum requirements: the CMake and OpenSSL libraries.
sudo apt-get install cmake libssl-dev
Use git from the command line to clone the source code:
git clone https://github.com/baloyan/eccpem.git
cd eccpem
To configure and build the project, run the following commands:
mkdir build
cd build
cmake ..
make
sudo make install
Usage
As an example, create a eccpem_test.c file and write the following code:
#include <eccpem/eccpem.h>
#include <stdio.h>
int main() {
const char* pubkey_file = "pub_key.pem";
const char* privkey_file = "priv_key.pem";
const char* ec_type = "secp256k1";
const int error_code = CreateECCKeysPemFiles(ec_type, pubkey_file, privkey_file);
if (error_code == 1) {
printf("Generation of ECC key pairs was successful.\n");
} else {
printf("Generation of ECC key pairs failed.\n");
}
return 0;
}
Compile the above code (gcc for C, g++ for C++):
gcc -o myeccpem eccpem_test.c -leccpem -lssl -lcrypto
Run executable file:
./myeccpem
See C++ example: cpp_gen_pem_files.cpp
ECCPEM API
For detailed the ECCPEM API documentation take a look at eccpem/docs
Contributions
Contributions can be made by submitting GitHub pull requests to this repository. In general, the ECCPEM source code follows Google's C++ style guide. (Yes, it is for C++, but please follow the rules for C language as well).
License
All contributions are made under the MIT license. See LICENSE.
Related Skills
qqbot-channel
342.5kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
docs-writer
99.6k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
342.5kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
Design
Campus Second-Hand Trading Platform \- General Design Document (v5.0 \- React Architecture \- Complete Final Version)1\. System Overall Design 1.1. Project Overview This project aims t
