image thumbnail

secp256k1 Elliptic Curve Shared-Key Generation GUI

version 1.0.0 (3.2 KB) by David Hill
Elliptic Curve Cryptography using secp256k1. Generates private-key times a given point (input) that is on the elliptic curve.


Updated 15 Nov 2019

View License

Program executes scalar multiplication on a provided point, G (input) and a provided 256-bit randomly generated private-key, d (input). The program defaults to the secp256k1 base point. Inputs should be in big-endian hexidecimal. Program has only been tested on a few points using a variety of private-keys. User generates the user's public-key by Q=dG and provides it to another user. The other user provides their public-key (q) which generates the shared-key, S=dq by running the algorithm again. The shared-key (S) is used to encrypt and decrypt messages shared between the two users using an algorithm such as AES (Advanced_Encryption_Standard). This program was not designed for high speed but executes rather quickly none the less. The program does not run a check to verify the input point is on the elliptic curve (y^2=Y=x^3+7).

Cite As

David Hill (2022). secp256k1 Elliptic Curve Shared-Key Generation GUI (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2019a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!