• The forum software that supports hummy.tv has been upgraded to XenForo 2.3!

    Please bear with us as we continue to tweak things, and feel free to post any questions, issues or suggestions in the upgrade thread.

Beta Offline decryption utility

I guess it would be easy enough to provide a command line version, @EEPhil ?
You'd think so. But using the GUI I didn't have to worry about command line switches. Biggest problem might be the use of Java (as prpr will probably say - it's 💩). I used it because I don't have (or can't use) an up-to-date C/C++ with the necessary libraries that allow a very simple call to a pre-defined decryption routine. I tried looking for an algorithm, function or library on t'net but have yet to find a suitable one. If I do, I might look into a command line version in C. Absolutely no promises on that one. Don't fancy doing a command line version in Java - I think the command would be too complicated, perhaps:
java -jar HFODUL.jar -k 000378bd11f336333731303434393630 -f "800 Words_20180418_1434" -o "800 Words_20180418_1434_dec"
(using af123's example from post #1). Without checking, I'm not sure whether there might be a conflict between parameters passed to "java" and those passed to "HFODUL". :frantic:
Maybe not so simple.
 
Can you say which decryption libraries you would need please?
Not easily. I only know the calls I have to use in Java. In the C I have there are no decryption functions at all.
FWIW in Java:
Java:
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
...
private final byte[] key;         // Decryption key
private byte[] tsPacket;         // 188 byte standard .ts packet
private Cipher cipher;     
...
cipher = Cipher.getInstance("DESede/ECB/NoPadding");
cipher.init(Cipher.DECRYPT_MODE,new SecretKeySpec(key, "DESede"));
...
// encrypt_start  (int) is offset into tsPacket where encrypted bytes start
// encrypt_length (int) is number of bytes of encrypted data
byte[] decryptedBytes = cipher.doFinal(tsPacket, encrypt_start, encrypt_length);
 
stripts uses the OpenSSL library but also has a standalone version of the required decryption routine. It would probably not be too hard to build for Windows - I can give it a try.
 
I used it because I don't have (or can't use) an up-to-date C/C++ with the necessary libraries that allow a very simple call to a pre-defined decryption routine
I assume you are looking for 3DES functionality. I doubt that is built in but you could always get this via a 3rd party library (see HERE for example)

[expletive deleted]! And I thought I was being helpful by producing a GUI.
You were! I am probably a bit weird in that I'm a Windows guy but I prefer the command line where possible. I have a large number of archived recordings over several network mounted locations that does contain the odd encrypted file. With a command line version I could then easily knock up a script to traverse all those recordings, identify the encrypted ones and decode them in place.
 
I'm a Windows guy but I prefer the command line where possible.
I came from a command line background and resisted GUIs for a long time. I mean who talks to a computer with a mouse?
Thanks for the link - I'll give it a look.
 
[expletive deleted]! And I thought I was being helpful by producing a GUI.
It depends what you're trying to do. GUIs are great for some things, but are hopeless for automation. CLIs are great for automation, once you know what you are doing. The ideal is to have both.
 
@af123 Pushing my luck a bit here I know, but I was wondering if there is a possibility that you could do same for the standalone HMT utility for us Windows users? If its too much hassle then don't bother but it would be a nice to have this one too...
 
It depends what you're trying to do. GUIs are great for some things, but are hopeless for automation. CLIs are great for automation, once you know what you are doing. The ideal is to have both.
That's the problem! I'm not sure that I do.
At someone's request I sort of automated the GUI by allowing selection of a whole directory or multiple files. I mean the program sticks the list of files in a queue and runs them in the background one at a time. Automated - ish?
 
@af123 Just did a proper decryption test and its all looking good and quick! I just knocked up a vbscript file to search my NAS for encrypted files (which is why I was asking about HMT) and it looks like a have a lot more archived encrypted files than I anticipated so this utility should come in very handy! Thanks again.

3982
 
Just did a proper decryption test and its all looking good and quick!
Excellent! I had the standalone code in there from when I was doing speed comparisons between it and openssl; I'm glad I left it in now.
 
Now that the Windows command line stripts is available can I take it that I needn't look into providing a Windows command line decryption utility - except for my own amusement?
 
@af123 Just did a proper decryption test and its all looking good and quick! I just knocked up a vbscript file to search my NAS for encrypted files (which is why I was asking about HMT) and it looks like a have a lot more archived encrypted files than I anticipated so this utility should come in very handy! Thanks again.
Out of curiosity how does the speed compare between stiprts on windows and the java version?
Have you tried the same recording with both and are the resultant files identical?
 
Out of curiosity how does the speed compare between stiprts on windows and the java version?ave you tried the same recording with both and are the resultant files identical?

HFODU2 took 240 secs approximately (had to hand time it) to decode the same file. You would expect it to be longer with all the Java overhead!

The resulting file was identical according to the Windows FC command...

3987
 
Back
Top