Stream Confidentiality for PDF etc.

+2 votes


I did the instruction for Linux.

Unfortunately, this method is only suitable for text files (txt), but I need it format independent.

So, now my question is, how can I send/encrypt other formats like PDF oder MS Word (docx) with this instruction in Linux?
And is there although a possibility to do the same in Windows 8 ?

Thanks in advance for your answer!
asked Aug 9, 2019 by M.Maier

1 Answer

+1 vote
You can apply this method with any file, not just a text file. But you would probably need to complete the steps using the API instead of the command line, because you'll hit various limits for command line lengths. Nonetheless the principles are the same.

You can also do this using MultiChain for Windows, using the API in the same way.
answered Aug 9, 2019 by MultiChain
Which API do you mean exactly? Encryption API or a format converting API or...?
And where do I have to adjust it here :
Or do you mean that I have to develop an own program in order to apply your suggestions?
Yes, exactly. The example is designed for short pieces of data - for large pieces of data you would need to convert this to your own code instead of using the command line.

Your alternative is to use MultiChain Enterprise (free demo available) which has a much simpler mechanism for handling data confidentiality on the blockchain.
The / proc / is a system folder, right? Does it serve as a file storage, so that even larger, format-independent files can be set, which can then be sent encrypted?
Up to what size can text files be sent with the standard instructions per cmd?
And is there a command overview with which I can adapt the code?
Maybe the format independence can be solved with the line "cipherhex=$(openssl enc -aes-256-cbc -in /proc/cpuinfo -pass pass:$password | xxd -p -c 99999)" by using the context help for cipherhex = $(   ?
The /proc/cpuinfo is not relevant except for providing an example of a file to encode. You should not be using the /proc directory in your application, but rather some other regular directory that belongs to the user.

The limit on the size of file that can be sent with the instructions in that tutorial will depend on your own version of Linux.
Which API command do I need in order to call my self-written Java Programm?
And is there a possibility/a command to save the data I've sent in a memory in MultiChain? So that it's not just shown in the command line, but can although be persisted in a file.
On the first question, what does your self-written Java program do?

On the second question, anything that is output to the command line can be sent to a file instead. This is a Linux/Unix feature and not specific to MultiChain. Look up 'Linux redirection' online for lots of guidance.
I have 2 little java programs, with the "Getting Started" commands and the other java programm contains the commands from "Stream Confidentiality".
Maybe then I just need one API in the cmd to connect it with these java programs?
You wouldn't trigger these Java programs from MultiChain. You would trigger them from your own application. So I'm not sure what role the MultiChain API has in this.
Which AP! package is used for the Multichain programming in PHP?