secp256k1 support for oscrypto?

Open
#71 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start by inspecting oscrypto/_openssl/_libcrypto.py at the referenced curve identifier definitions and trace how asymmetric.generate_pair('ec', curve=...) resolves supported curves. Confirm the requested secp256k1 example works without compiling C libraries, and add or update the relevant tests if the repository identifies them.

Written by the indexing model from the issue text.

Description

from oscrypto import asymmetric
public, private = asymmetric.generate_pair('ec', curve='secp256k1')

Could this be supported? I am trying to play with notr protocol and do not want to compile C libraries.

I think openssl already support this curve. Like openssl ecparam -name secp256k1 -genkey -noout -out priv.pem. so we can add

    NID_secp160k1 = 708
    NID_secp192k1 = 711
    NID_secp224k1 = 712
    NID_secp256k1 = 714

to https://github.com/wbond/oscrypto/blob/master/oscrypto/_openssl/_libcrypto.py#L147

Dominant language
Python
Stars
346
Forks
82
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from wbond/oscrypto

All issues in wbond/oscrypto

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.