el_gamal

package
v0.0.0-...-ee1bab5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package el_gamal Copyright 2023 Oleg Fomenko. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Package el_gamal Copyright 2023 Oleg Fomenko. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

Functions

func Decrypt

func Decrypt(cypher *Cypher, prv *PrivateKey) (mx *big.Int, my *big.Int)

Types

type Cypher

type Cypher struct {
	Ax, Ay *big.Int
	Bx, By *big.Int
}

func Encrypt

func Encrypt(mx, my *big.Int, pub *PublicKey) (*Cypher, error)

type EncryptedMessage

type EncryptedMessage struct {
	Ax []*big.Int
	Ay []*big.Int
	Bx []*big.Int
	By []*big.Int
}

type Message

type Message struct {
	// contains filtered or unexported fields
}

func BytesToMessage

func BytesToMessage(msg []byte) *Message

type PrivateKey

type PrivateKey struct {
	*PublicKey
	D *big.Int
}

func GeneratePrivateKey

func GeneratePrivateKey() (*PrivateKey, error)

type PublicKey

type PublicKey struct {
	X, Y *big.Int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL