SQLite DB encryption

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

SQLite DB encryption

Post by Polo »

There are a few plugins for SQLite that supports database encryption - could one of them be added to the Database library?
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: SQLite DB encryption

Post by ts-soft »

I see only CEROD, this cost 2000 US $ and you can't ship the static lib, only the final exe.

Have you some links to other plugins?
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: SQLite DB encryption

Post by Polo »

This looks free: http://sqlcipher.net/
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: SQLite DB encryption

Post by ts-soft »

Okay, but i see some other problems. If Fred compile a static lib for PB, the compiler have always add the OpenSSL.lib,
so all executables that use SQLite a bigger. I see no way to make this optional, PB can't recompile the C-Source.
The other problem, is the Source always actual to the original SQLite-Source?

Okay, we will see what Fred says, if he says anything :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: SQLite DB encryption

Post by Polo »

ts-soft wrote:Okay, but i see some other problems. If Fred compile a static lib for PB, the compiler have always add the OpenSSL.lib,
so all executables that use SQLite a bigger. I see no way to make this optional, PB can't recompile the C-Source.
The other problem, is the Source always actual to the original SQLite-Source?

Okay, we will see what Fred says, if he says anything :wink:
Well there's the possibility of making it a new DB plugin, separate to the standard SQLite :)
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: SQLite DB encryption

Post by Zach »

But then you'd have to find someone to maintain it, and pray they don't go missing or abandon it.
klaver
Enthusiast
Enthusiast
Posts: 147
Joined: Wed Jun 28, 2006 6:55 pm
Location: Schröttersburg

Re: SQLite DB encryption

Post by klaver »

Polo wrote:This looks free: http://sqlcipher.net/
Is here someone who managed to compile it and test with PureBasic?
Image
User avatar
loadstone
User
User
Posts: 97
Joined: Wed Jan 16, 2008 11:28 am
Location: china

Re: SQLite DB encryption

Post by loadstone »

Wxsqlite is very good , that can be encrypt , I hope pb package it :)
Diamond Sutra: all law I was into at, forbearance .
http://www.8do8.com
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: SQLite DB encryption

Post by IdeasVacuum »

Wxsqlite is very good , that can be encrypt , I hope pb package it
........but that is an sqlite wrapper for wxWidgets!
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
loadstone
User
User
Posts: 97
Joined: Wed Jan 16, 2008 11:28 am
Location: china

Re: SQLite DB encryption

Post by loadstone »

IdeasVacuum wrote:........but that is an sqlite wrapper for wxWidgets!
incidentally , that good to Wrapper the wxWidgets in PB :P
Diamond Sutra: all law I was into at, forbearance .
http://www.8do8.com
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: SQLite DB encryption

Post by Polo »

You can wrap it if you wanna, the PB gadget library is good enough for most of us :)
(and that's not what this request is about :) )
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: SQLite DB encryption

Post by Zach »

Just offering some thoughts on this.

It is my understanding that the SQlite source must be modified to be included within PB in the first place. So I don't see why adding encryption support should be a huge problem for users (not commenting on the programming aspect of adding it, I don't know what Fred knows). You could add it as a totally separate library, or you could integrate it into existing SQLite support in PB, by adding some additional parameters to the Procedures that are used for SQlite.. A master boolean toggle for encryption on/off and it can decide when/if to include the extra encryption stuff into the compiled program?
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Encryption as a feature of PB Database library ?

Post by USCode »

Alternatively, would it be possible for Fred to add encryption as a generic feature of the PB database library itself, rather than for a specific database engine (SQLite)?

Not exactly sure how it would be done, I'll leave the API/implementation details to Fred and the other gurus here, but if we could flag either all columns or just specific columns to be encrypted - that would be slick.

Then the ability to encrypt data would be automatically applicable to ALL databases that PB supports, including any DBs supported in the future.
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: SQLite DB encryption

Post by skywalk »

I have to believe this would be incredibly inefficient?
Wouldn't it be faster to only compress/encrypt certain fields in your table design?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Re: Encryption as a feature of PB Database library ?

Post by USCode »

skywalk wrote:Wouldn't it be faster to only compress/encrypt certain fields in your table design?
USCode wrote:... or just specific columns to be encrypted ...
Post Reply