Solved Batch CertUtil Encoding Problems, please help.

Hewlett-packard / Pavilion hpe
January 13, 2015 at 02:47:08
Specs: Windows 7, 3.6GHz 16GB
Hello.
I am working on a program that hides and encrypts folders/files using the 7zip standalone console and the CertUtil function in cmd.

First I put the folder into an archive using 7zip:

7z-sa.exe a -mx0 "folder.zip" "folder\" > nul

(no compression, basically turning the folder into a file)

then I apply this command to the file:

CERTUTIL -ENCODE "folder.zip" "folder.enc" > nul

Which will encode the file using base64 encoding.

However when the zip file is larger than around 80 megabytes, the CertUtil command will fail and the encoding won't occur.

Is there a limit for how big the files can be when using CertUtil? If so, is there a better option for encryption to use with cmd or a way to work around it?

If infinity is infinite, is the square root of infinity infinite as well?
- Kurp Von Steiner

message edited by RainBawZ


See More: Batch CertUtil Encoding Problems, please help.

Report •

#1
January 13, 2015 at 03:14:30
I'm using XP, which has no CertUtil. So I dunno.
But I'll stay tuned.

=====================
M2 Golden-Triangle


Report •

#2
January 13, 2015 at 14:23:51
*without opening CMD*

Yes. It depends on the exact input, but the limit's right around 80MB, I'd say.

None that I know of. You could probably write one with VBScript. PowerShell has a few scripts out there. Not sure as to .NET's max string size; base64 was always designed for smallish blobs. http://blogs.msdn.com/b/powershell/...

How To Ask Questions The Smart Way


Report •

#3
January 13, 2015 at 19:49:47
✔ Best Answer
Someone correct me if I'm wrong, since that happens often. But base-64 is not an encryption algorithm. It is used to transmit binary data over a text-based medium that won't handle 8-bit bytes. http://www.computing.net/howtos/sho... Anyone can read/"decode" base-64 because it's not a security or encryption tool. If your intent is to secure your data, this approach won't achieve that. Have you tried 7-zip "-p" (password) option? I don't know enought about 7-zip to help beyond that. I usually use PKzip to encrypt, but haven't tried it on large files. To my knowledge, most-if-not-all archive utilities offer encryption option.

message edited by nbrane


Report •

Related Solutions

#4
January 14, 2015 at 04:24:12
Well it's for "securing files", yes. But just for making them harder to read/open for uninvited guests. I thought base-64 sounded like a great option just to alter the "insides" of the file

I haven't tried using the password options with 7z, I'll look into the scripting reference and pop back to let you guys know the outcome.

If infinity is infinite, is the square root of infinity infinite as well?
- Kurp Von Steiner

message edited by RainBawZ


Report •

#5
January 14, 2015 at 20:10:06
I tried PKZIP on a file just over 2GB and it works.
Takes a few minutes. LOL

=====================
M2 Golden-Triangle


Report •

#6
February 1, 2015 at 04:44:03
I tried the password switch with the 7z console, worked like a charm, just had to re-wite some parts of the codes and it was all good. Thanks.

If infinity is infinite, is the square root of infinity infinite as well?
- Kurp Von Steiner


Report •

Ask Question