<commit_before>
twnacl = require 'tweetnacl'

#=============================================

class Pub

#=============================================

class Priv

#=============================================

class Pair

  constructor : ({@pub, @priv}) ->

  @generate : (params, cb) ->

#=============================================

exports.EdDSA = exports.Pair = PAir<commit_msg>a bit more work, that's it for now.<commit_after>twnacl = require 'tweetnacl'
{SRF} = require '../rand'

#=============================================

class Pub

  constructor : (@key) ->
    
#=============================================

class Priv

  constructor : (@key) ->

#=============================================

class Pair

  constructor : ({@pub, @priv}) ->

  @generate : (params, cb) ->
    await SRF.random_bytes twnacl.sign.seedLength, defer seed
    {secretKey, publicKey} = twnacl.sign.keyPair.fromSeed(seed)
    pub = new Pub publicKey
    priv = new Priv secretKey
    cb null, new Pair {pub, priv}

#=============================================

exports.EdDSA = exports.Pair = Pair
{'fraction_non_alphanumeric': 0.422971741112124, 'fraction_numerical': 0.0, 'mean_word_length': 5.1, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7617509', 'n_tokens_mistral': 314, 'n_tokens_neox': 286, 'n_words': 72}