You are here

public static function ParagonIE_Sodium_Crypto32::scalarmult_base in Automatic Updates 7

Same name and namespace in other branches
  1. 8 vendor/paragonie/sodium_compat/src/Crypto32.php \ParagonIE_Sodium_Crypto32::scalarmult_base()

ECDH over Curve25519, using the basepoint. Used to get a secret key from a public key.

Parameters

string $secret:

Return value

string

Throws

SodiumException

TypeError

4 calls to ParagonIE_Sodium_Crypto32::scalarmult_base()
ParagonIE_Sodium_Compat::crypto_scalarmult_base in vendor/paragonie/sodium_compat/src/Compat.php
Calculate an X25519 public key from an X25519 secret key.
ParagonIE_Sodium_Crypto32::box_keypair in vendor/paragonie/sodium_compat/src/Crypto32.php
@internal Do not use this directly. Use ParagonIE_Sodium_Compat.
ParagonIE_Sodium_Crypto32::box_publickey_from_secretkey in vendor/paragonie/sodium_compat/src/Crypto32.php
@internal Do not use this directly. Use ParagonIE_Sodium_Compat.
ParagonIE_Sodium_Crypto32::box_seed_keypair in vendor/paragonie/sodium_compat/src/Crypto32.php

File

vendor/paragonie/sodium_compat/src/Crypto32.php, line 904

Class

ParagonIE_Sodium_Crypto32
Class ParagonIE_Sodium_Crypto

Code

public static function scalarmult_base($secret) {
  $q = ParagonIE_Sodium_Core32_X25519::crypto_scalarmult_curve25519_ref10_base($secret);
  self::scalarmult_throw_if_zero($q);
  return $q;
}