Opened 5 years ago

Closed 4 years ago

#5896 closed enhancement (wontfix)

Encrypted library in OMEdit

Reported by: giovanni.cillo@… Owned by: adeas31
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)

comment:1 follow-up: Changed 5 years ago by casella

@adrpo, do you think we could keep unencripted parts in an encrypted library?

comment:2 follow-up: Changed 4 years ago by 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?
Do I need to store a license file somewhere?
Is the known issue with Modelon libraries?

Last edited 4 years ago by olivleno (previous) (diff)

comment:3 in reply to: ↑ 1 Changed 4 years ago by adeas31

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 in reply to: ↑ 2 Changed 4 years ago by adeas31

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.

comment:5 follow-up: Changed 4 years ago by olivleno

Is it fixed in 1.15 already or do I have to install 1.16.0-dev-nightly?

comment:6 follow-up: Changed 4 years ago by olivleno

In v1.15.0 I tried Loading of MBL-2020.1-3.5-build1-r9267-OCT after renaming to MBL2020.
Same crash.

comment:7 in reply to: ↑ 5 ; follow-up: Changed 4 years ago by adeas31

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 in reply to: ↑ 6 Changed 4 years ago by adeas31

Replying to olivleno:

In v1.15.0 I tried Loading of MBL-2020.1-3.5-build1-r9267-OCT after renaming to MBL2020.
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.

comment:9 in reply to: ↑ 7 ; follow-up: Changed 4 years ago by 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.
  • 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?

comment:10 follow-up: Changed 4 years ago by 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"?

comment:11 in reply to: ↑ 9 Changed 4 years ago by adeas31

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 in reply to: ↑ 10 Changed 4 years ago by adeas31

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.

comment:13 Changed 4 years ago by casella

@adeas31, maybe we could also cherry pick your fixes for 1.15.0?

comment:14 Changed 4 years ago by adeas31

They will be for the new 1.15 release.

comment:15 follow-up: Changed 4 years ago by casella

@giovanni, can we consider this sorted out? 1.15.0-beta.1 should be released soon.

comment:16 in reply to: ↑ 15 Changed 4 years ago by giovanni

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!

comment:17 follow-up: Changed 4 years ago by 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).

comment:18 in reply to: ↑ 17 Changed 4 years ago by casella

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 Changed 4 years ago by adeas31

  • Milestone changed from Future to 1.16.0
  • Resolution set to wontfix
  • Status changed from new to 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.

Note: See TracTickets for help on using tickets.