Home Online Manual
Top
Back: m_merkle_hellman_transformation
Forward: m_merkle_hellman_decryption
FastBack:
FastForward:
Up: crypto_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.12.2.51 m_merkle_hellman_encryption

Procedure from library crypto.lib (see crypto_lib).

Usage:
m_merkle_hellman_encryption(knapsack, message)

Return:
an encrypted message as integer

Note:
This works in the same way as merkle_hellman_encryption. The additional function is created to keep consistency with the needed functions for every kryptosystem.

Example:
 
LIB "crypto.lib";
//Please note that the values for primenum and hardknapsack have been obtained from the example of m_merkle_hellman_transformation!
list knapsack = 1,43,132,139;
list message = 1,0,0,1;
m_merkle_hellman_encryption(knapsack,message);
==> 140