DevOTechS Forums
August 26, 2019, 12:35:11 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: DevOTechS forums
 
  Home Help Search Calendar Login Register  
  Show Posts
Pages: [1]
1  HIME / Encryption, decryption / Re: Suggestions on: August 15, 2012, 10:09:44 PM
Hi George,

At this time, no further HIME developments are planned.

Kind regards
Eddy
2  HIME / General HIME discussions / Re: Huge Format "hi_bin" on: November 26, 2008, 10:16:46 AM
Hi,
The returned answer is correct. What did you expect it to be ?

Kind regards
Eddy
3  NUMS / General NUMS discussions / Re: NUMS Features on: September 23, 2008, 04:37:25 PM
I was not aware you already had a Forum which is great.

Hi Peter,

Good to hear from you.
Yes, I set up the forums some time ago but I did not make much publicity about it.
Perhaps I should send all my customers a notification mail.
Anyway, glad you found it !  Smiley

Quote from: PeterM

Just a question regarding NUMS, ... its capabilities and what other features you are looking at implementing ?

NUMS is a mathematical library (a dll) I am developing now for arbitrary precision floating point and signed big integer calculations.
As you know, HIME has math functions for unsigned huge integers, but I got requests from users for adding floating point math functions.
Rather than to add such functionality in HIME, I chose to develop a new product, called NUMS.

NUMS is based on the same huge integer math kernel as HIME.
But NUMS can handle variables in 5 different data types: 4 numerical data types and a dynamic string data type:


1. "BinFloat", Binary base Arbitrary Precision Floating Point data type
This data type stores numbers in the format:

   mantissa * 256^exp

  • 'mantissa' is a signed binary number of which the maximum length can be determined by the user. It can be upto 2^31 (2147483648) bits long. That is the equivalent of 646 million decimal digits !
  • 'exp' is a binary number ranging from -2147483648 to +2147483647 ( -2^31 to 2^31 - 1)


2. "DecFloat", Decimal base Arbitrary Precision Floating Point data type
This data type stores numbers in the format:

   mantissa * 10^exp

This is a floating point number, simular to the BinFloat data type, except it is base 10.

  • 'mantissa' is a signed binary number of which the maximum length can be determined by the user. It can be upto 2^31 (2147483648) bits long.
  • 'exp' is a binary number ranging from -2147483648 to +2147483647 ( -2^31 to 2^31 - 1)


3. "Rational", rational number data type
This data type stores numbers in the format:

   nominator / denominator

  • 'nominator' is a signed binary huge integer number. It can be upto 2^31 (2147483648) bits long.
  • 'denominator' is an unsigned binary huge integer number. It can be upto 2^31 (2147483648) bits long.
So, a rational number consists (internally) always of 2 integer numbers.
 

4. "BigInt", big integer data type
This data type stores numbers in the format:

   big integer

  • 'big integer' is a signed binary huge integer number. It can be upto 2^31 (2147483648) bits long. That is the equivalent of 646 million decimal digits !


5. "String", string data type
This data type stores alphanumerical string data upto 2^31 (2147483648) bytes long.

 

PROS AND CONS OF THE VARIOUS DATA TYPES

BinFloat
+ Fast math operations
- Possibility for base conversion errors when converting to and from decimal (No base conversion errors when converting to and from hexadecimal or binary).

DecFloat
+ No base conversion errors when converting to and from decimal.
- A little more overhead during math operations compared to BinFloats.

Rational
+ No rounding errors for +, -, *, / 
- Generally, slower math operations compared to above data types.

BigInt
+ No rounding errors when used for integer operations.
- Only suitable for integer number math.

 
NUMS is still under development. Functions implemented so far are:
  • Basic math functions: +, -, *, /, e^x, LOG, x^2, square root, ABS, FIX (INT), FRAC
  • Boolean functions:  =, <>, >, >=, <, <=,  CMP, IsZero
  • Various functions to exchange data with NUMS
  • Support functions to convert numbers between the various data types, set precision, etc.

Functions that are in preparation and will be added to the first release:
  • x^y, LOG2, LOG10
  • Trigonometric functions: SIN, COS, TAN, ASIN, ACOS, ATAN, SINH, COSH, TANH, ASINH, ACOSH, ATANH
  • Pow, PowMod, Mod, ModInv for integers
  • Matrix calculation functions

If you like to know more, just ask.

Kind regards
Eddy

 

4  HIME / Calling HIME Functions / Re: Delphi 2006 on: September 23, 2008, 11:49:27 AM
Hi Theo,

Welcome on these forums !

HIME function parameters are passed (to HIME) by reference (and not by value). I think that this is the cause of your problem.
If a function parameter is passed by reference, the (HIME) function receives an address of the parameter and not the actual parameter value itself.
If you pass a parameter by value, its value is passed to HIME but HIME expects an address and interpretes the parameter value as an address.
That is why the error message reports "Read of address 00000003.". Probably, your function call passes the parameter value of 3, and HIME thinks that this is an address and tries to fetch the parameter at that address, which causes the access violation because that address does not belong to your program space.

So, please retry by passing the parameters to the HIME functions by reference.
I believe in Delphi this is done by using the "var" keyword in your function declarations.

Could you let me know if that did the trick ?   Smiley

Kind regards
Eddy
5  HIME / General HIME discussions / Re: Truncation problems on: May 07, 2008, 09:26:32 AM
My P, Q and e values are from a know good RSA key, hence I should be able to calculate all the other components from these.
Gwyn,
That is correct.

Meanwhile, just thinking out loud:
  • Is your plaintext pure ascii string or is it binary (perhaps containing possible zero bytes) ?
  • After encryption, do you retrieve the ciphertext from HIME to restore it later in HIME, or do you just leave it in the HIME register ?
  • Truncation: is you decrypted ciphertext (which should normally match your original plaintext) actually truncated (chopped off) or does it contain a series of correct characters/bytes and, following that, a series of incorrect characters ? From your first post I assume the latter, but it has me a little confused with 'truncation'  Smiley

Kind regards
Eddy
6  HIME / General HIME discussions / Re: Truncation problems on: May 06, 2008, 08:56:26 PM
Hi Gwyn,

I looked a little deeper into your code snippet. Two suggestions:
1 - Use HIME function hi_GenerateRSAKeys to generate public key, private key and modulus, because you are cutting corners generating the key in your code example. The relation between public key exponent 'e' and '(p-1)(q-1)' must be so that GCD of e and (p-1)(q-1) = 1 , where GCD is the Greatest Common Divisor.
Also: 1 < e < (p-1)(q-1) .
If these conditions are not fulfilled, you must choose new p and q (and/or e) until the conditions are fulfilled. P and q are both prime numbers, as you know.

Maybe you are doing this, but it is not shown in your code.

2 - As stated before, make sure that plaintext is smaller than the modulus.

Hope this helps.

Kind regards
Eddy
7  HIME / General HIME discussions / Re: Truncation problems on: May 06, 2008, 05:08:28 PM
PS. Also remember that with RSA, your plaintext length must always be smaller than the modulus length.

Eddy
8  HIME / General HIME discussions / Re: Truncation problems on: May 06, 2008, 05:06:25 PM
Hi Gwyn,

You seem to be trying to create the RSA keys yourself ?
Unless you have a good reason not to, I highly recommend to use the HIME hi_GenerateRSAKeys or hi_GenerateRSAKeys_CRT  functions to generate the RSA public and private keys.

The HIME manual (included with the zip package you downloaded) has a page called "RSA encryption/decryption" that shows a complete example (though not in C#) of how to encrypt and decrypt data with RSA, both the 'classic' way as with using CRT (Chinese Remainder Theorem).

Kind regards
Eddy
9  General / News / Announcements / Introducing these forums on: March 18, 2008, 11:15:38 PM
Hi everyone,

As you probably have noticed, there are 2 forum categories (apart from the 'General' one):
- HIME: The Huge Integer Math and Encryption library is covered there. All of those forums are open for posting.
- NUMS: This is for discussions about a new DevOTechS product in development: NUMS, an Arbitrary Precision Floating Point Math Library.

Kind regards
Eddy
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!