pyca / pyca/pynacl

pynacl crypto_core_hsalsa20

Open
#632 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.2k
Forks
267
Avg merge
42m
Merged PRs (30d)
2

Description

I need the crypto_core_hsalsa20 function to greate an secret key for my NUKI.

Both sides calculate DH Key k using function dh1
a. Key
0DE40B998E0E330376F2D2FC4892A6931E25055FD09F054F99E93FECD9BA611E
8. Both sides derive a long term shared secret key s from k using function kdf1
a. Shared key
217FCB0F18CAF284E9BDEA0B94B83B8D10867ED706BFDEDBD2381F4CB3B8F730

4.2 The key derivation function kdf1
static const unsigned char _0[16];
static const unsigned char sigma[16] = "expand 32-byte k";
crypto_core_hsalsa20(k,_0,s,sigma)
Used to derive a long term secret key out of the shared key calculated by dh1

I alredy calculated the DH Key k with the nacl.publik.Box (=dh1) function.

Can someone tell me how to use the kdf1 function with pynacl?
Thanks!

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

The issue mentions nacl.public.Box and crypto_core_hsalsa20, but no repository file or test. Start by tracing the Box binding and checking how PyNaCl exposes existing libsodium primitives. Done should be a clear, supported way to perform the requested derivation, with coverage for the provided inputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
cryptography, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.