Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vb.net bigger than decimal data type

I am using VB.net and I want to make some cryptographic computations with keys length 1024bit (128bytes). I do not want to use a know algorithm thus I cannot use the Security library. The biggest data type in vb.net is decimal (16bytes).

how can I do those computations? is there a different data type that I am not aware of?

like image 943
Reven Avatar asked May 08 '26 15:05

Reven


2 Answers

You may like to check System.Numerics.BigInteger in .NET 4.0.

Also you may find it interesting to check Large Number Calculations in VB.NET

like image 154
Rahul Tripathi Avatar answered May 11 '26 16:05

Rahul Tripathi


It would be instructive, even if you're not going to use them, to inspect the existing classes in the System.Security.Cryptography namespace.

You'll note that most of the methods that need to deal with keys, blocks, etc, are specced in terms of byte[]. A byte[] can be as big as you want/need it to be.


(Insert usual warnings about rolling your own crypto code)

like image 20
Damien_The_Unbeliever Avatar answered May 11 '26 16:05

Damien_The_Unbeliever



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!