Standard library / crypto/rsa

crypto/rsa.CRTValue

Historical additional-prime acceleration data: Exp is reduced exponent, Coeff is inverse coefficient, R is product of prior primes. Do not construct production keys by hand. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
type CRTValue struct {  Exp   *big.Int // D mod (prime-1).  Coeff *big.Int // R·Coeff ≡ 1 mod Prime.  R     *big.Int // product of primes prior to this (inc p and q).}

Working Example

Example Snippetgo
package main
import (  "crypto/rsa"  "fmt")
func main() { var v rsa.CRTValue; fmt.Println(v.Exp == nil && v.Coeff == nil && v.R == nil) }func must[T any](v T, e error) T {  if e != nil {    panic(e)  }  return v}func check(e error) {  if e != nil {    panic(e)  }}
Go Reference