Sha256: c4afbe29b3eece91b37f241a890917d9e013782c2e59d9dd1c6a0522315b2363

Contents?: true

Size: 957 Bytes

Versions: 33

Compression:

Stored size: 957 Bytes

Contents

/**
 * EdDSA-Java by str4d
 *
 * To the extent possible under law, the person who associated CC0 with
 * EdDSA-Java has waived all copyright and related or neighboring rights
 * to EdDSA-Java.
 *
 * You should have received a copy of the CC0 legalcode along with this
 * work. If not, see <https://creativecommons.org/publicdomain/zero/1.0/>.
 *
 */
package net.i2p.crypto.eddsa.math;

public interface ScalarOps {
    /**
     * Reduce the given scalar mod $l$.
     * <p>
     * From the Ed25519 paper:<br>
     * Here we interpret $2b$-bit strings in little-endian form as integers in
     * $\{0, 1,..., 2^{(2b)}-1\}$.
     * @param s the scalar to reduce
     * @return $s \bmod l$
     */
    public byte[] reduce(byte[] s);

    /**
     * $r = (a * b + c) \bmod l$
     * @param a a scalar
     * @param b a scalar
     * @param c a scalar
     * @return $(a*b + c) \bmod l$
     */
    public byte[] multiplyAndAdd(byte[] a, byte[] b, byte[] c);
}

Version data entries

33 entries across 29 versions & 2 rubygems

Version Path
vagrant-unbundled-2.2.2.0 vendor/bundle/ruby/2.5.0/gems/ed25519-1.2.4/ext/ed25519_jruby/net/i2p/crypto/eddsa/math/ScalarOps.java
ed25519-1.2.4-java ext/ed25519_jruby/net/i2p/crypto/eddsa/math/ScalarOps.java
ed25519-1.2.4 ext/ed25519_jruby/net/i2p/crypto/eddsa/math/ScalarOps.java
ed25519-1.2.3-jruby ext/ed25519_jruby/net/i2p/crypto/eddsa/math/ScalarOps.java
ed25519-1.2.3 ext/ed25519_jruby/net/i2p/crypto/eddsa/math/ScalarOps.java
ed25519-1.2.2-jruby ext/ed25519_jruby/net/i2p/crypto/eddsa/math/ScalarOps.java
ed25519-1.2.2 ext/ed25519_jruby/net/i2p/crypto/eddsa/math/ScalarOps.java
ed25519-1.2.1-jruby ext/ed25519_jruby/net/i2p/crypto/eddsa/math/ScalarOps.java
ed25519-1.2.1 ext/ed25519_jruby/net/i2p/crypto/eddsa/math/ScalarOps.java
ed25519-1.2.0-jruby ext/ed25519_jruby/net/i2p/crypto/eddsa/math/ScalarOps.java
ed25519-1.2.0 ext/ed25519_jruby/net/i2p/crypto/eddsa/math/ScalarOps.java
ed25519-1.1.0-jruby ext/ed25519_jruby/net/i2p/crypto/eddsa/math/ScalarOps.java
ed25519-1.1.0 ext/ed25519_jruby/net/i2p/crypto/eddsa/math/ScalarOps.java