Opened 5 years ago

Closed 5 years ago

#5896 closed enhancement (wontfix)

Encrypted library in OMEdit

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

comment:1 by Francesco Casella, 5 years ago

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

comment:2 by Oliver Lenord, 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?

Last edited 5 years ago by Oliver Lenord (previous) (diff)

in reply to:  1 comment:3 by Adeel Asghar, 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!

in reply to:  2 comment:4 by Adeel Asghar, 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.

comment:5 by Oliver Lenord, 5 years ago

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

comment:6 by Oliver Lenord, 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.

in reply to:  5 ; comment:7 by Adeel Asghar, 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.

in reply to:  6 comment:8 by Adeel Asghar, 5 years ago

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.

in reply to:  7 ; comment:9 by Oliver Lenord, 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?

comment:10 by Oliver Lenord, 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"?

in reply to:  9 comment:11 by Adeel Asghar, 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.

in reply to:  10 comment:12 by Adeel Asghar, 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.

comment:13 by Francesco Casella, 5 years ago

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

comment:14 by Adeel Asghar, 5 years ago

They will be for the new 1.15 release.

comment:15 by Francesco Casella, 5 years ago

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

in reply to:  15 comment:16 by giovanni, 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!

comment:17 by Oliver Lenord, 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).

in reply to:  17 comment:18 by Francesco Casella, 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 Adeel Asghar, 5 years ago

Milestone: Future1.16.0
Resolution: wontfix
Status: newclosed

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.