Skip to content

Simple Diffie-Hellman computation fails. #80

@shumy-tools

Description

@shumy-tools

A simple computation as:

final FieldElement nodeSecret = Utils.getRandomFieldElement();
final GroupElement nodeKey = Utils.basePoint.scalarMultiply(nodeSecret.toByteArray());
    
final FieldElement termSecret = Utils.getRandomFieldElement();
final GroupElement termKey = Utils.basePoint.scalarMultiply(termSecret.toByteArray());
    
nodeKey.scalarMultiply(termSecret.toByteArray());

Fails with:

Exception in thread "main" java.lang.NullPointerException
at net.i2p.crypto.eddsa.math.GroupElement.select(GroupElement.java:930)
at net.i2p.crypto.eddsa.math.GroupElement.scalarMultiply(GroupElement.java:964)
at AOTMainTest.main(AOTMainTest.java:26)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions