EldoS | Feel safer!

Software components for data protection, secure storage and transfer

I need SecureBlackBox support algoritm SHA-1

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#166
Posted: 05/11/2006 16:05:15
by Julio Hernández (Basic support level)
Joined: 05/11/2006
Posts: 11

Hi, I am developing an application similar to which brings SecureBlackBox, I need to create a crypt file PGP with this application that of name contains the SHA-1 additionally, but see that it does not support this algorithm or that I create at least.

The algorithms that I could see single were these: CAST5, 3DES, AES128, AES356.

I hope help me, thanks! :)
#168
Posted: 05/11/2006 16:06:03
by Eugene Mayevski (EldoS Corp.)

SHA1 is a hashing algorithm, you can't use it for encryption. Please review your requirements.


Sincerely yours
Eugene Mayevski
#169
Posted: 05/11/2006 16:14:48
by Julio Hernández (Basic support level)
Joined: 05/11/2006
Posts: 11

Ok, I understand.

The bookstore of SecureBlackBox provides with some function in C # to me that generates hashing to me :( , I need a sha-1, the file encrypt with anyone: CAST5, 3DES, AES128, AES356, it must take by name a hash code.
#171
Posted: 05/11/2006 23:41:34
by Ken Ivanov (EldoS Corp.)

As far as I understood, you need to create an encrypted document with additional MDC (modification detection code) packet. MDC always uses SHA1, so you can use any desired stream algorithm (CAST5, AES, ...) with it.

To create modification-protected message, you should set the ElPGPWriter.UseNewFeatures property to true and call ElPGPWriter.EncryptAndSign() method.
#186
Posted: 05/12/2006 08:40:00
by Julio Hernández (Basic support level)
Joined: 05/11/2006
Posts: 11

Hello Innokentiy Ivanov :) , Good Morning!!!.

Thanks for your answer, excuses by not knowing how to explain, almost I do not dominate the English to me, but what I need it is to keep in the local machine a file that of name has the Original file but in addition the code hashing with which he was encript. The method of the PGPFilesDemo_VS2005 example in C # is called ProtectFile(string SourceFile, string DestFile) in line 1298. From this I need to add to the name of the file a Shah-1 to him. For example therefore I would have left:

data_1E1awx565sxjlur65.PGP, I do not know if the method pgpWriter.GetHashCode() returns the HashCode with the file that was generated or returns another different one from the codified one in the file.

Greetings, I hope help me or they orient to me :(
#187
Posted: 05/12/2006 08:51:59
by Ken Ivanov (EldoS Corp.)

Quote
what I need it is to keep in the local machine a file that of name has the Original file but in addition the code hashing with which he was encript.

Don't you need to *sign* a file rather than to encrypt it? The approach you explained is called detached signing. Please consider using TElPGPWriter.Sign() method (setting its Detached parameter to false).

Quote
I do not know if the method pgpWriter.GetHashCode() returns the HashCode with the file that was generated or returns another different one from the codified one in the file.

GetHashCode() is a method of System.Object class from .NET framework and it is not related to PGP or SecureBlackbox in any way. You should use TElPGPWriter.Sign() method to create a signature, and TElPGPReader.VerifyDetached() to validate it.
#188
Posted: 05/12/2006 09:25:06
by Julio Hernández (Basic support level)
Joined: 05/11/2006
Posts: 11

Ok, I understand. All it does well, compresses file PGP with that same name, correct. But I need to keep the file with its original name but in addition the code to the algorithm whereupon was encrypt. There is a programming code where I need to specify this code hash of the algorithm or anyone 3Des, Aes, etc.

Example Line 1298: outF = new System.IO.FileStream(this.tbFile.Text.Replace(".pgp", "_" + pgpWriter.hashEncrypt + "pgp"), FileMode.Create);

Result in C:\data_1E1awx565sxjlur65.PGP

Although I know that in this point it has still not been encrypt east file so that a method returns this hash to me of the algorithm. The property pgpWriter.hashEncrypt is ideological and it does not exist in the TElPGPWriter.

Greeting :cry:
#189
Posted: 05/12/2006 09:47:31
by Ken Ivanov (EldoS Corp.)

Quote
But I need to keep the file with its original name but in addition the code to the algorithm whereupon was encrypt. There is a programming code where I need to specify this code hash of the algorithm or anyone 3Des, Aes, etc.

3DES and AES are encryption algorithms, not hashing ones. TElPGPWriter uses SHA1 algorithm if UseOldPackets property is set to false, and MD5 otherwise. That is, if UseOldPackets is set to false in your application, you can simply append "_SHA1" to the name of your file.

Quote
Although I know that in this point it has still not been encrypt east file so that a method returns this hash to me of the algorithm. The property pgpWriter.hashEncrypt is ideological and it does not exist in the TElPGPWriter.

This property was intentionally omitted when the class was designed in order to maximize compatibility with other implementations. Though, your advice seems reasonable for us, so we implement this property in the following build update (which is expected in one or two days).
#190
Posted: 05/12/2006 10:15:28
by Julio Hernández (Basic support level)
Joined: 05/11/2006
Posts: 11

Thanks to all the moderators who amiably have oriented to me. On a clear idea of encryption algorithms(AES, 3DES, etc) and hashing algorithm(Sha-1).

I will be pending on new updates, but is not an obstacle because software goes of wonders and is what I hoped.

Greetings :D
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages

Reply

Statistics

Topic viewed 8049 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!