Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 16-08-2011, 14:34   #1
Registered User

Join Date: Aug 2011
Location: UK
Posts: 10
Function Query

Hi all,

I'm just looking into this for the first time so I'd be grateful if anyone can help with this question.
Is it possible to load an S.57 chart into OpenCPN without first writing it to the HDD, i.e. by passing a reference to a copy in memory?

If so this could possibly solve a problem I've had for a while.

Thanks for the help
__________________

__________________
bukko is offline   Reply With Quote
Old 16-08-2011, 14:56   #2
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,018
Re: Function query

bukko...
Not without modifying the code. Also keep on mind that S-57 is first ingested into the internal SENC format and then this compiled chart is loaded and displayed.

Pavel
__________________

__________________
nohal is offline   Reply With Quote
Old 16-08-2011, 15:00   #3
Registered User

Join Date: Aug 2011
Location: UK
Posts: 10
Re: Function query

Hi Pavel,

that would be fine as long as the SENC is secure.
I guess the key point is, I could modify the code to work this way.

Thanks
__________________
bukko is offline   Reply With Quote
Old 16-08-2011, 15:25   #4
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,018
Re: Function query

bukko...
I'm not even pretending that I understand what you would like to accomplish... If what you want to do is display a chart in a format you don't want or can't disclose, that's what the plugin API chart type plugins is for - currently BSB4 and NV.Digital formats are handled this way.

Pavel
__________________
nohal is offline   Reply With Quote
Old 16-08-2011, 15:38   #5
Registered User

Join Date: Aug 2011
Location: UK
Posts: 10
Re: Function query

The charts are S.57 format, but S.63 protected.
However the required usage is not as per standard S.63.
The S.63 part isn't a problem because I already have the S.63 keys, but I want to be able to display a chart without compromising the security. This means passing decrypted chart to the viewer (or writing it into the SENC) from memory i.e. without writing the to the filesystem.
Of course, if the SENC itself is not secure this poses another problem!
It might be that I need to write a secure loading function, and possibly add security to the SENC which actually could be the bigger task!
__________________
bukko is offline   Reply With Quote
Old 17-08-2011, 09:03   #6
Registered User
 
Kudalufi's Avatar

Join Date: Aug 2011
Location: Halifax
Boat: Frigate, Halifax Class, 134.2m
Posts: 14
Re: Function Query

I'm not sure I understand. S-63 charts aren't generally encrypted for security - they are encrypted as a DRM scheme. If you have the license file and the ability to decrypt them outside of OpenCPN, then I see no reason why not simply do that and provide S-57 to OpenCPN.

If you are trying to create some sort of security mechanism, then use a RAM-disk for both storage of the decrypted S-57 and for OpenCPN's SENC folder. I don't think OpenCPN has a method of altering the SENC folder, so some OS trickery might be needed there - can try using a shortcut pointing to the RAM disk, or adding the ability to OpenCPN to set the SENC folder (which now occurs to me would be a nice feature). This way neither the charts nor the SENCs will exist outside of volatile memory. The SENCs will need to be rebuilt every time you reboot your computer, though.

For security, though, a much better solution is to simply use whole-disk-encryption. Something like TrueCrypt. The weakest encryption in TrueCrypt is orders of magnitude more secure than the cipher used in S-63.
__________________
Ex Turbo Modestum
Kudalufi is offline   Reply With Quote
Old 17-08-2011, 14:08   #7
Registered User

Join Date: Aug 2011
Location: UK
Posts: 10
Smile Re: Function Query

The security I'm talking about is DRM protection.
(See here: Implementing the IHO Security Scheme)

What I want to do is produce a viewer which can be freely distributed to enable the viewing of S.63 protected data.
I don't need a full S.63 implementation though. The keys are distributed in a proprietary 'DRM' encrypted format, and will be handled by the viewer with no user interaction.

In this way I can remove the S.63 protection, but I don't want to expose the chart to possible copying while unprotected, so the decryption and decompression are handled in memory.

Of course this is weakened if I then need to write the unprotected chart to HDD so that it can be loaded, so I'd rather load it from memory if possible.
However, if the SENC is also not secure can just be copied onto another system and re-used, this would be an unacceptable vulnerability.

It's possible that this is too much additional coding to add to this app, but I've been working on this for a while before someone sent me a link here, so any suggestions would be greatly appreciated!
__________________
bukko is offline   Reply With Quote
Old 18-08-2011, 02:31   #8
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,018
Re: Function Query

bukko...
To make this work, you can't inject the chart into OpenCPN at neither S-57 nor SENC level - this can never be secure from the S-63 DRM point of view IMHO. The code is GPL licensed, so you would have to make it available, so anybody could theoretically get access to either unencrypted S-57 or SENC which is not meant to contain the protection. That's why the encrypted and DRM'd chart formats are handled by the plugins in OpenCPN. What's an obvious solution is to take the OpenCPN's S-57 code and modify it to be part of your S-63 plugin. But as it's still GPL licensed, you can't just link it into your library - you probably have to use a fork & exec scheme to accomplish this.

Pavel
__________________
nohal is offline   Reply With Quote
Old 18-08-2011, 03:37   #9
Registered User

Join Date: Aug 2011
Location: UK
Posts: 10
Re: Function Query

Pavel,

thanks that's very helpful.

What you say makes a lot of sense.
Even using callouts to non-GPL code, what would stop someone from modifying a copy of the published code to make unprotected copies of the data?

I guess it's back to the drawing board (probably a white board these days!)

Cheers
__________________

__________________
bukko is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Imgkap - kap File Converter Tool MdJ OpenCPN 222 12-11-2015 17:15
Dolphin Charger Query Skipper Geoff Electrical: Batteries, Generators & Solar 9 04-06-2013 21:42
Where Is RTK Function ? smart OpenCPN 2 14-08-2011 16:54
Is there a Function for Me to Save My Favorite Posts ? Johnathon123 Forum Tech Support & Site Help 2 09-07-2011 14:49



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 04:04.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.