Public key derivator for ECDSA (without knowledge of the private key)

A proof of concept of a public key derivation for ECDSA (without knowledge of the private key)

It is a demonstration of how to implement a simple key derivation algorithm for public keys without knowledge of private keys. This works for any asymmetric crypto algorithm with distributive property enabled for public key. The idea is very simple:

Let's imagine s0 is the private key, then public key would be P0 = s0*B (where B is the basepoint of the curve). So if a new private key is derived as s1 = s0 + d then a new public key could be derived as P1 = (s0+d)*B. Thus new public key is: P1 = s0*B + d*B = P0 + d*B. That's it.

Note: It does not work for EDDSA, since it hashes public keys with SHA512.

Demonstration

See the unit test:

func TestDerivePublic(t *testing.T) {
	randReader := rand.New(rand.NewSource(0))
	derivationKey := []byte{1, 2, 3}

	privKey, err := ecdsa.GenerateKey(elliptic.P521(), randReader)
	require.NoError(t, err)

	derivedPubKey := DerivePublic(privKey.Public().(*ecdsa.PublicKey), derivationKey)
	derivedPrivKey := DerivePrivate(privKey, derivationKey)

	require.Equal(t,
		derivedPrivKey.Public().(*ecdsa.PublicKey),
		derivedPubKey,
	)
}

result:

xaionaro@void:~/go/src/github.com/xaionaro-go/ecdsakeyderivation$ go test ./... -count=1
ok  	github.com/xaionaro-go/ecdsakeyderivation	0.101s
Similar Resources

This plugin enhances Hashicorp Vault Service with cryptographic operations to create, import and sign using different type of keypairs and Ethereum wallets, including signing operation for public ethereum transaction, EEA and Quorum

This plugin enhances Hashicorp Vault Service with cryptographic operations to create, import and sign using different type of keypairs and Ethereum wallets, including signing operation for public ethereum transaction, EEA and Quorum

Quorum Hashicorp Vault plugin The Quorum plugin enhances Hashicorp Vault Service with cryptographic operations under Vault engine, such as: Create and

Jan 7, 2023

A public facing version of the Chicago data microservices repo.

chicago-data | full stack reporting solution Project Overview This repo houses microservices dedicated to ingesting and preparing open Chicago dataset

Jun 22, 2022

minimal implementation of secured encrypted tcp/ip connection without tls / ssl.

go-secure-transport Demo implementation of secured encrypted TCP connection without TLS / SSL. See ./example for server & client using the transport t

Dec 15, 2021

Running chaincode in development mode: Smart contract developers that want to iteratively develop and test their chaincode packages without the overhead of the smart contract lifecycle process for every update.

Fabric DEVMODE - Nano bash 1 ORG + 1 PEER + 1 ORDERER Based on fabric-samples/test-network-nano-bash, but using devmode fabric peer Prereqs Follow the

May 14, 2022

An easy-to-use XChaCha20-encryption wrapper for io.ReadWriteCloser (even lossy UDP) using ECDH key exchange algorithm, ED25519 signatures and Blake3+Poly1305 checksums/message-authentication for Go (golang). Also a multiplexer.

Quick start Prepare keys (on both sides): [ -f ~/.ssh/id_ed25519 ] && [ -f ~/.ssh/id_ed25519.pub ] || ssh-keygen -t ed25519 scp ~/.ssh/id_ed25519.pub

Dec 30, 2022

sops is an editor of encrypted files that supports YAML, JSON, ENV, INI and BINARY formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault, age, and PGP

sops is an editor of encrypted files that supports YAML, JSON, ENV, INI and BINARY formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault, age, and PGP

sops is an editor of encrypted files that supports YAML, JSON, ENV, INI and BINARY formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault, age, and PGP. (demo)

Jan 9, 2023

:key: Idiotproof golang password validation library inspired by Python's passlib

passlib for go 100% modules-free. Python's passlib is quite an amazing library. I'm not sure there's a password library in existence with more thought

Dec 19, 2022

Simple, fast and safe cross-platform linear binary stream communication protocol. AES key exchange based on ecc secp256k1

FFAX Protocol 2 dev 简体中文 Welcome to FFAX Protocol v2 Quick start go get github.com/RealFax/FFAX func example() { listener, err := net.Listen("tcp",

Mar 21, 2022

Proof of History in Golang. Taking key concepts from the Solana whitepaper and providing examples in Go

Proof of History - Concepts in Go ________ ________ ___ ___ |\ __ \|\ __ \|\ \|\ \ \ \ \|\ \ \ \|\ \ \ \\\ \

Oct 13, 2022
This project was builded to improve my knowledge about blockchain and cryptocurrency

Blockchain Hello World in GoLang This project was builded to improve my knowledge about blockchain and cryptocurrency. To build this project, I've fol

Feb 20, 2022
EtherGuess - Crack Ethereum account private key
EtherGuess - Crack Ethereum account private key

EtherGuess This program generates random Ethereum private keys and check for acc

Jun 6, 2022
generate a chia address by public key, chia公钥生成地址

chia-address-generator This repo is a hack way to generate an address from publicKey. So it's not a good enough way to use it in prod, use it just for

Mar 9, 2022
Xk6-crypto-x509 - A k6 extension to encrypt data with a PEM Public Key

xk6-crypto-x509 A k6 extension to encrypt data with a PEM Public Key This is a k

Jan 5, 2022
Split and distribute your private keys securely amongst untrusted network
Split and distribute your private keys securely amongst untrusted network

cocert An experimental tool for splitting and distributing your private keys safely* cocert, generates ECDSA - P521 key and uses a technique known as

Dec 5, 2022
Arbitrum is a Layer 2 cryptocurrency platform that makes smart contracts scalable, fast, and private.
Arbitrum is a Layer 2 cryptocurrency platform that makes smart contracts scalable, fast, and private.

Arbitrum is a Layer 2 cryptocurrency platform that makes smart contracts scalable, fast, and private. Arbitrum interoperates closely with Ethereum, so Ethereum developers can easily cross-compile their contracts to run on Arbitrum. Arbitrum achieves these goals through a unique combination of incentives, network protocol design, and virtual machine architecture.

Jan 8, 2023
Proving possession of private data using KZG-Polynomial Commitments.

data proof Copyright (c) 2021 George Carder [email protected] GENERAL PUBLIC LICENSE Version 3 // proof of concept // not efficient, optimized,

Nov 26, 2021
Private Terraform Provider Registry For Golang

private-reggie Private Terraform Provider Registry Test With curl $ curl http://localhost:8080/terraform/providers/v1/hashicorp/hashicups/versions ht

Dec 13, 2021
Monero: the secure, private, untraceable cryptocurrency
Monero: the secure, private, untraceable cryptocurrency

Monero Copyright (c) 2014-2021 The Monero Project. Portions Copyright (c) 2012-2013 The Cryptonote developers. Table of Contents Development resources

Jan 2, 2023
Go implementation of a vanity attempt to generate Bitcoin private keys and subsequently checking whether the corresponding Bitcoin address has a non-zero balance.

vanity-BTC-miner Go implementation of a vanity attempt to generate Bitcoin private keys and subsequently checking whether the corresponding Bitcoin ad

Jun 3, 2022