However, as matlab itself can read those files, it needs to include the decryption algorithm and key, from where it can be reverse engineered. And it seems like someone has done this and produced an online.p code decryptor.
'Luca Cerone' wrote in message news:[email protected]. Hi everybodyI'd like to setup my Matlab so that I can be able to send email to a recipient list of people using my Yahoo account. I'd like to avoid my username and password to be visible (at least the password)and also the people addresses I want the email to be sent. Is there an easy way to store this informations in an encrypted file to be used by my Matlab functions? Write a small function to send the email and then PCODE that function. Steve Lord comp.soft-sys.matlab (CSSM) FAQ: us 1/2/2010, 10:28 น. pcode seems to help, but actually, which kind of encryption does it perform?
![Decrypt p file matlab central download Decrypt p file matlab central download](/uploads/1/2/5/4/125448905/542616201.jpg)
I mean apart that the code is not actually readable, which is the level of protection? If you run your P-coded function, it will call other functions, e.g.
To send the data. These other functions can be easily shadowed by M-files in the same directory. Therefore it is easy to listen to all output of your function and the secret password is not protected in a P-file. A nice example for a trial to protect information in a P-file is Matt Fig's passprotect in the FEX. Nevertheless, it can be broken in a minute. Kind regards, Jan Luca Cerone 2/2/2010, 2:36 น.
Thanks for answers and help. Actually seems that pcode doesn't really help, and I think there might be some issues even if I would use a compiled function: the main problem is that settinge for the email should be set up like: setpref('Internet','SMTPUsername',myusername).
But if you do so (even in a compiled function), these data are easily retrieved using getpref('Internet'). So I was thinking to modify the sendmail.m function so that after having retrieved preferences it would use a private key to decrypt the values. But actually am not so sure that it would work. Any suggestion about it? Cheers, -Luca Jan Simon 2/2/2010, 11:24 น.
'Jan Simon' wrote in message. Thanks for your answer Jan. It is not an old thread and I wanted to ask about same topic. So I believe no need to create a new thread for my question. So I do the following. I save the struct as.mat file and read the mat file as binary. And then encrypt the file and save back to drive again.
But how can I convert the binary file to struct again after I open and decrypt the encrypted file. Code: save(fileName, '-mat','-struct', 'someStructs'); fid = fopen(fileName, 'rb'); data = fread(FID, 'uint8=uint8'); encryptedData = aescrypt(dzip(data ),key); I don’t know how to convert 'uint8' 'encryptedData' back to struct variable. Walter Roberson, 8:34 น. On 23/12/10 9:41 AM, John wrote: So I do the following.
I save the struct as.mat file and read the mat file as binary. And then encrypt the file and save back to drive again. But how can I convert the binary file to struct again after I open and decrypt the encrypted file. Code: save(fileName, '-mat','-struct', 'someStructs'); fid = fopen(fileName, 'rb'); data = fread(FID, 'uint8=uint8'); encryptedData = aescrypt(dzip(data ),key); I don’t know how to convert 'uint8' 'encryptedData' back to struct variable. The decrypted file is.not. a struct: the decrypted file is a complete matlab.mat file. Mathworks does not provide user-level tools for dealing with.mat files in memory.
I don't know what tools are available through mex. John, 4:28 น. Actually new winzip offers 256 bit AES encryption so I don't think it takes minutes to break in. But anyway, Matlab doesn’t offer a function to create encrypted zip files. I have a solution instead and it works fine with some limitations: Serializing as Jan suggested and then use AES encryption together with dzip (If dzip is not used, you get only first letters of the fields after decryption). Encryption: ct = aescrypt(dzip(serialize(yourstruct)),key); Decryption: yourstruct = deserialize(dunzip(aesdecrypt(ct,key))); Serialize/Deserialize: Rapid AES data encryption and decryption: Rapid lossless data compression of numerical or string variables: Limitations: It doesn’t work if there is a logical array in struct.
There shouldn’t be more than 256 fields in struct. Jeremy 18/3/2011, 11:01 น.
There are some exceptions:. sometimes companies lose their source code but still have the.p around and later need to get back to source. in some situations involving one company purchasing another company, there might be legal rights to the intellectual property but the original code might not be available. in some countries, reverse engineering is legal, at least within some contexts. For example in some countries, security researchers have the legal right to reverse engineer code to attempt to find security problems.
In some countries, people with disabilities have rights to adapt software to make it usable for them.