You are here

public static function ParagonIE_Sodium_Crypto::scalarmult_base in Automatic Updates 8

Same name and namespace in other branches
  1. 7 vendor/paragonie/sodium_compat/src/Crypto.php \ParagonIE_Sodium_Crypto::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_Crypto::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_Crypto::box_keypair in vendor/paragonie/sodium_compat/src/Crypto.php
@internal Do not use this directly. Use ParagonIE_Sodium_Compat.
ParagonIE_Sodium_Crypto::box_publickey_from_secretkey in vendor/paragonie/sodium_compat/src/Crypto.php
@internal Do not use this directly. Use ParagonIE_Sodium_Compat.
ParagonIE_Sodium_Crypto::box_seed_keypair in vendor/paragonie/sodium_compat/src/Crypto.php

File

vendor/paragonie/sodium_compat/src/Crypto.php, line 905

Class

ParagonIE_Sodium_Crypto
Class ParagonIE_Sodium_Crypto

Code

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