Opened 5 years ago
Closed 5 years ago
#5896 closed enhancement (wontfix)
Encrypted library in OMEdit
Reported by: | Owned by: | Adeel Asghar | |
---|---|---|---|
Priority: | high | Milestone: | 1.16.0 |
Component: | OMEncryption | Version: | |
Keywords: | encryption | Cc: |
Description
Currently there is no possibility in the standard version of OMEdit to read an encrypted library with extension '.mol'. This feature would permit to use a library with protected code inside, just viewing icon and documentation.
Change History (19)
follow-up: 3 comment:1 by , 5 years ago
follow-up: 4 comment:2 by , 5 years ago
In OpenModelica v1.15.0-dev-35-g58a97b19a (64-bit) there is a command "Load Encrypted Library", which opens a dialog to select a .mol file.
Unfortunately this leads to a crash when loading the Modelon Base Library:
MBL-2020.1-3.5-build1-r9267-OCT.mol
See also files attached to ticket:
https://trac.openmodelica.org/OpenModelica/ticket/5935
Is this feature not yet ready to use?
Do I need to store a license file somewhere?
Is the known issue with Modelon libraries?
comment:3 by , 5 years ago
Replying to casella:
@adrpo, do you think we could keep unencripted parts in an encrypted library?
OpenModelica encrypts all the .mo files of the library except package.order and resource files.
It think what Giovanni wants is to able to open the encrypted libraries using the open-source version of OpenModelica which is not possible. To be able to decrypt or read the encrypted libraries one needs a private key and with our open-source builds we can't do that. Private key is suppose to be kept secret!
comment:4 by , 5 years ago
Replying to olivleno:
In OpenModelica v1.15.0-dev-35-g58a97b19a (64-bit) there is a command "Load Encrypted Library", which opens a dialog to select a .mol file.
Unfortunately this leads to a crash when loading the Modelon Base Library:
MBL-2020.1-3.5-build1-r9267-OCT.mol
See also files attached to ticket:
https://trac.openmodelica.org/OpenModelica/ticket/5935
Is this feature not yet ready to use?
If you mean encryption feature then yes.
Do I need to store a license file somewhere?
Which license file?
Is the known issue with Modelon libraries?
Yes and is fixed already. The problem is you need to use Modelica naming convention even for .mol files. It has to be the name of the library or the name with version number not like MBL-2020.1-3.5-build1-r9267-OCT
. But this is already fixed so instead of crashing it shows an error message now.
follow-up: 7 comment:5 by , 5 years ago
Is it fixed in 1.15 already or do I have to install 1.16.0-dev-nightly?
follow-up: 8 comment:6 by , 5 years ago
In v1.15.0 I tried Loading of MBL-2020.1-3.5-build1-r9267-OCT
after renaming to MBL2020
.
Same crash.
follow-up: 9 comment:7 by , 5 years ago
Replying to olivleno:
Is it fixed in 1.15 already or do I have to install 1.16.0-dev-nightly?
You need to install 1.16 encryption build.
Note that even the new build can't load the library but it will not crash.
comment:8 by , 5 years ago
Replying to olivleno:
In v1.15.0 I tried Loading of
MBL-2020.1-3.5-build1-r9267-OCT
after renaming toMBL2020
.
Same crash.
.mol is zip file so you can open it and see what is the name of the folder inside it. I am guessing renaming to Modelon.mol
will work.
follow-up: 11 comment:9 by , 5 years ago
Replying to adeas31:
You need to install 1.16 encryption build.
Note that even the new build can't load the library but it will not crash.
- This means it's not working in v1.15. I'd suggest to disable the command until ready to use.
- v1.16 doesn't crash but also does not work in the sense that one could load an encrypted library.
- The name of the .mol file and all contained folders must comply to the conventions of a fully qualified name in Modelica.
What is the 1.16 encryption build and how do I get it?
follow-up: 12 comment:10 by , 5 years ago
Referring to:
https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/encryption.html
Note that you need a special version of OpenModelica with encryption support. Contact us if you want one.
Does this constraint apply to "Export Encrypted Libraries" only or also to "Load Encrypted Libraries"?
comment:11 by , 5 years ago
Replying to olivleno:
Replying to adeas31:
You need to install 1.16 encryption build.
Note that even the new build can't load the library but it will not crash.
- This means it's not working in v1.15. I'd suggest to disable the command until ready to use.
It is working just can't handle the bogus name.
- v1.16 doesn't crash but also does not work in the sense that one could load an encrypted library.
As I said earlier the .mol is a zip file so we don't know what it contains. We rely on the name of the .mol to look for the Modelica package inside it. So the name has to be the Modelica package name with version number e.g., Modelica.mol, Modelica 3.1.mol, Modelica 3.2.mol
- The name of the .mol file and all contained folders must comply to the conventions of a fully qualified name in Modelica.
What is the 1.16 encryption build and how do I get it?
I sent you an email with a download link.
comment:12 by , 5 years ago
Replying to olivleno:
Referring to:
https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/encryption.html
Note that you need a special version of OpenModelica with encryption support. Contact us if you want one.
Does this constraint apply to "Export Encrypted Libraries" only or also to "Load Encrypted Libraries"?
Yes.
follow-up: 16 comment:15 by , 5 years ago
@giovanni, can we consider this sorted out? 1.15.0-beta.1 should be released soon.
comment:16 by , 5 years ago
Replying to casella:
@giovanni, can we consider this sorted out? 1.15.0-beta.1 should be released soon.
Since opening an encrypted library using the open-source version of OpenModelica will not be possible, yes this ticket is sorted out for me. Thank you all!
follow-up: 18 comment:17 by , 5 years ago
Shipping non-functional commands is not a good solution.
As of now the Load Encrypted Library allows to select a library, then says Loading... and then the screen refreshes and nothing has changed, no notification, no error. This drives users nuts.
I'd suggest to disable the commands in the standard release or better provide an error message that explains what needs to be done to use this feature, e.g. refer to the users guide (link above).
comment:18 by , 5 years ago
Replying to olivleno:
Shipping non-functional commands is not a good solution.
As of now the Load Encrypted Library allows to select a library, then says Loading... and then the screen refreshes and nothing has changed, no notification, no error. This drives users nuts.
I'd suggest to disable the commands in the standard release or better provide an error message that explains what needs to be done to use this feature, e.g. refer to the users guide (link above).
I totally agree!
comment:19 by , 5 years ago
Milestone: | Future → 1.16.0 |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
I'd suggest to disable the commands in the standard release or better provide an error message that explains what needs to be done to use this feature, e.g. refer to the users guide (link above).
Yes in the standard release version you will get such a message. In your case it is just crashing way before it can show the error message.
The actual issue in this ticket is resolved so I am closing this ticket but if you still have the same problem with the latest nightly build version then reopen the ticket.
@adrpo, do you think we could keep unencripted parts in an encrypted library?