Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-21 Thread Richard Hipp
On 2/21/20, Andy KU7T wrote: > Are you saying the PRNG on Windows is not good enough to use > randomblob(16) in Sqlite? All I need is a reasonable assurance that is are > unique... The default PRNG on Windows is fine for generating globally unique identifiers. The complaint is that the seeding

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Keith Medcalf
On Thursday, 20 February, 2020 22:06, Andy KU7T wrote: >I admit I do not fully understand all the arguments. I am running on >Windows. Are you saying the PRNG on Windows is not good enough to use >randomblob(16) in Sqlite? All I need is a reasonable assurance that is >are unique... Yes, it is

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Andy KU7T
tps://aka.ms/ghei36> From: sqlite-users on behalf of Rowan Worth Sent: Thursday, February 20, 2020 7:00:20 PM To: SQLite mailing list Subject: Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers? On Fri, 21 Feb 2020 at 03:59

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Rowan Worth
On Fri, 21 Feb 2020 at 03:59, Jens Alfke wrote: > > On Feb 20, 2020, at 10:48 AM, Richard Hipp wrote: > > > > That assumption is not correct for SQLite, which does you a > > cryptographically strong PRNG. And the SQLite PRNG is seeded from > > /dev/random on unix. > > Not quite; I'm looking at

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Jens Alfke
> On Feb 20, 2020, at 10:48 AM, Richard Hipp wrote: > > That assumption is not correct for SQLite, which does you a > cryptographically strong PRNG. And the SQLite PRNG is seeded from > /dev/random on unix. Not quite; I'm looking at the function unixRandomness() in SQLite 3.28. It's seeded

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Keith Medcalf
On Thursday, 20 February, 2020 11:48, Richard Hipp wrote: >The author of that article, "Raymond", assumes that the random number >generator in the SQL database engine is not cryptographically strong. Actaully, what "Raymond" is on about is the fact that the original definition of a GUID,

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Richard Hipp
On 2/20/20, Keith Medcalf wrote: > > randomblob(16) does not generate a valid UUID (it does not set the version > and variant flags in the resulting 16-bytes of random data). If you need a UUID in the "standard format", rather than just an ID that its universally unique, you can use the uuid.c

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Richard Hipp
On 2/20/20, Andy KU7T wrote: > Hi, > I added a randomblob(16) to each record of a Sqlite table via a trigger with > the goal of global uniqueness. Is that the correct approach or would it be > better to pass Guid from .Net? I am using System.Data.Sqlite. The following > article got me questioning

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Keith Medcalf
randomblob(16) generates 16 random bytes. randomblob(16) does not generate a valid UUID (it does not set the version and variant flags in the resulting 16-bytes of random data). If you set the version to 4 and the variant to 1 then randomblob(16) does produce valid version 4 uuids with