Sciencemadness Discussion Board
Not logged in [Login ]
Go To Bottom

Printable Version  
 Pages:  1  
Author: Subject: Encrypted Lab Notebook
JJay
International Hazard
*****




Posts: 3440
Registered: 15-10-2015
Member Is Offline


[*] posted on 6-8-2017 at 18:00
Encrypted Lab Notebook


Several months ago, I started keeping my lab notebook on a machine with an encrypted drive. I haven't conducted any illegal experiments, but I don't want people casually paging through it.

Since there is little purpose to keeping information on an encrypted drive with the machine running all the time, I wrote this script to shut down the machine (it's a Linux box) when the machine has been idle for more than 15 minutes. I run it every minute as a cron job:

Code:
#!/usr/bin/perl use strict; use List::Util qw[min max]; my $MAX_IDLE = 15 * 60 - 1; my $HOME = $ENV{"HOME"}; # check how long currently logged in users have been idle my $ttyidletime = `who -s | perl -lane 'print 86400 * -A "/dev/\$F[1]"' | sort --numeric-sort | tail -1`; chomp $ttyidletime; if("$ttyidletime" eq "") { $ttyidletime = 999999; } # get uptime my $uptimeo = `cat /proc/uptime`; chomp $uptimeo; $uptimeo =~ m/([0-9]+)/; my $uptime = $1; # also check time since last login my $lastlog = `ls /dev/tty* -l | cut -c36-47 | xargs -d'\\n' -l1 -i{} date -d{} +'%s' | sort | tail -1`; chomp $lastlog; my $lasttime = time() - $lastlog; # check xwindows idle time $ENV{DISPLAY} = ":0.0"; my $xidle = `xprintidle | head -1`; my $xidletime = 999999; if($xidle =~ m/([0-9]+)[ \t]+([0-9]+)/) { $xidletime = $2; $xidletime /= 1000; } system "echo 'ttyidletime is \"$ttyidletime\"' > $HOME/rebooter_status.txt"; system "echo 'uptime is \"$uptime\"' >> $HOME/rebooter_status.txt"; system "echo 'lasttime is \"$lasttime\"' >> $HOME/rebooter_status.txt"; system "echo 'xidletime is \"$xidletime\"' >> $HOME/rebooter_status.txt"; my $idletime = min($ttyidletime, $uptime, $lasttime, $xidletime); if($idletime > $MAX_IDLE) { system "echo /sbin/shutdown -h now >> $HOME/rebooter_status.txt"; system "/sbin/shutdown -h now"; } else { system "echo idletime is not high enough >> $HOME/rebooter_status.txt"; }


I've been thinking it would be good to add an extra layer of security by using an editor that allows modifying PGP-encrypted files in place, but for my purposes, that's probably overkill. I've also considered that it might be useful to register parts of it in a blockchain if I were to discover something patentable. And I would like to be up to date on all the latest tinfoil hat technology :) Am I the only one who keeps an encrypted lab notebook? What do you do to keep your lab notebook secure?

[Edited on 7-8-2017 by JJay]




View user's profile View All Posts By User
Metacelsus
International Hazard
*****




Posts: 2539
Registered: 26-12-2012
Location: Boston, MA
Member Is Offline

Mood: Double, double, toil and trouble

[*] posted on 6-8-2017 at 18:16


I've got full-disk encryption set up on my computer. Besides that, the lab notebook file itself isn't encrypted in any special way. I haven't done any home science in a while (since I've been working in university research labs), so I don't use that notebook very much.





As below, so above.

My blog: https://denovo.substack.com
View user's profile View All Posts By User
Texium
Administrator
********




Posts: 4581
Registered: 11-1-2014
Location: Salt Lake City
Member Is Offline

Mood: PhD candidate!

[*] posted on 6-8-2017 at 20:14


I really don't see the point of encrypting a lab notebook unless you're doing something illegal. I mean, my blog is essentially a copy of my home chemistry lab notebook. Publicly available. Other than that I just do things the old fashioned way and write up my experiments in a physical notebook, the contents of which I'm happy to share with anyone interested.

And it's just my opinion, but I feel like if you truly have nothing to hide, JJay, your paranoia is only creating a self-fulfilling prophecy by making you look suspicious...




Come check out the Official Sciencemadness Wiki
They're not really active right now, but here's my YouTube channel and my blog.
View user's profile Visit user's homepage View All Posts By User
Loptr
International Hazard
*****




Posts: 1348
Registered: 20-5-2014
Location: USA
Member Is Offline

Mood: Grateful

[*] posted on 6-8-2017 at 20:24


Yeah, no need to go to all that trouble to hide your lab notebook. What is in there that isn't already available by access to the lab itself. It's not like the physical lab gets locked up into this encrypted drive when the script executes.

What are you really gaining/accomplishing other than tending to fantasies? If it's casual observation that you are concerned about then a simple locked drawer would suffice.




"Question everything generally thought to be obvious." - Dieter Rams
View user's profile View All Posts By User
JJay
International Hazard
*****




Posts: 3440
Registered: 15-10-2015
Member Is Offline


[*] posted on 6-8-2017 at 20:42


Quote: Originally posted by zts16  
I really don't see the point of encrypting a lab notebook unless you're doing something illegal. I mean, my blog is essentially a copy of my home chemistry lab notebook. Publicly available. Other than that I just do things the old fashioned way and write up my experiments in a physical notebook, the contents of which I'm happy to share with anyone interested.

And it's just my opinion, but I feel like if you truly have nothing to hide, JJay, your paranoia is only creating a self-fulfilling prophecy by making you look suspicious...


Your opinion is noted, but I respectfully disagree. I would suggest that this is a topic of interest to many people on this board, and it was posted in the non-chemistry section. You don't like discussion of encryption in the non-chemistry section?

Case in point. If I had done this, I would not be wanting people to casually stumble across it: https://texium.wordpress.com/2017/03/22/preparation-of-anthr... Perhaps you aren't making quaaludes at home, but why should you have to prove it? It takes very little effort for me to keep my lab notebook encrypted. I see absolutely no evidence whatsoever of any amateur using a lab notebook as a defense and I see several instances where a well-meaning amateur went to prison after police read his lab notebook.




[Edited on 7-8-2017 by JJay]




View user's profile View All Posts By User
j_sum1
Administrator
********




Posts: 6324
Registered: 4-10-2014
Location: At home
Member Is Offline

Mood: Most of the ducks are in a row

[*] posted on 6-8-2017 at 21:08


My notebook is encrypted. It's really difficult to read my handwriting. Access is limited to one person at a time and you have to be in a particular physical location to see its contents.

I think my notebook is more secure than yours will ever be, JJay.
View user's profile View All Posts By User
JJay
International Hazard
*****




Posts: 3440
Registered: 15-10-2015
Member Is Offline


[*] posted on 6-8-2017 at 21:16


Quote: Originally posted by j_sum1  
My notebook is encrypted. It's really difficult to read my handwriting. Access is limited to one person at a time and you have to be in a particular physical location to see its contents.

I think my notebook is more secure than yours will ever be, JJay.


I highly doubt that, actually, but it's hard to verify empirically.





View user's profile View All Posts By User
Texium
Administrator
********




Posts: 4581
Registered: 11-1-2014
Location: Salt Lake City
Member Is Offline

Mood: PhD candidate!

[*] posted on 6-8-2017 at 22:14


Quote: Originally posted by JJay  
Quote: Originally posted by zts16  
I really don't see the point of encrypting a lab notebook unless you're doing something illegal. I mean, my blog is essentially a copy of my home chemistry lab notebook. Publicly available. Other than that I just do things the old fashioned way and write up my experiments in a physical notebook, the contents of which I'm happy to share with anyone interested.

And it's just my opinion, but I feel like if you truly have nothing to hide, JJay, your paranoia is only creating a self-fulfilling prophecy by making you look suspicious...


Your opinion is noted, but I respectfully disagree. I would suggest that this is a topic of interest to many people on this board, and it was posted in the non-chemistry section. You don't like discussion of encryption in the non-chemistry section?

Case in point. If I had done this, I would not be wanting people to casually stumble across it: https://texium.wordpress.com/2017/03/22/preparation-of-anthr... Perhaps you aren't making quaaludes at home, but why should you have to prove it? It takes very little effort for me to keep my lab notebook encrypted. I see absolutely no evidence whatsoever of any amateur using a lab notebook as a defense and I see several instances where a well-meaning amateur went to prison after police read his lab notebook.
I have no issue with sharing that I've made anthranilic acid. At the end of the post I state three purposes of benign and theoretical interest that I have in mind for it. And several instances of a "well-meaning" amateur chemist going to prison after police read his lab notebook? Sources, please...

I don't have any problem with the discussion of lab notebook encryption, I just think it's a silly idea. I agree with j_sum1: if you want it to be truly secure your best bet is to not make a digital copy at all.

Edit: Also here's a prominent example where Tdep's lab notebook served as a piece of evidence in his favor: https://www.sciencemadness.org/whisper/viewthread.php?tid=62... Though they probably would have let him off anyway, it certainly didn't hurt. That's just the first positive example that came to mind for me. I'm certain there are more.

[Edited on 8-7-2017 by zts16]




Come check out the Official Sciencemadness Wiki
They're not really active right now, but here's my YouTube channel and my blog.
View user's profile Visit user's homepage View All Posts By User
JJay
International Hazard
*****




Posts: 3440
Registered: 15-10-2015
Member Is Offline


[*] posted on 6-8-2017 at 22:31


Sources.. oh geez... let's see here....

The most recent one I can think of was this, but I've seen several others: http://www.sciencemadness.org/talk/viewthread.php?tid=75832

In fairness, there are instances where people have shown their lab notebooks to police and had no problems afterwards, but obviously, police knowledge of his 50 prior experiments, one of which included chlorine gas, didn't help.

Oh and Tdep's experience... I did read about that, but I think they would have let him go without the notebook.




[Edited on 7-8-2017 by JJay]




View user's profile View All Posts By User
JJay
International Hazard
*****




Posts: 3440
Registered: 15-10-2015
Member Is Offline


[*] posted on 6-8-2017 at 23:01


So anyway, does anyone have a better method for encrypting their files documenting secret mad science experiment results than full drive encryption? :)



View user's profile View All Posts By User
violet sin
International Hazard
*****




Posts: 1480
Registered: 2-9-2012
Location: Daydreaming of uraninite...
Member Is Offline

Mood: Good

[*] posted on 6-8-2017 at 23:24


I like the idea of encrypting personal information, comforting kinda like a nice snuggly blanket. Regardless of whether or not there is any monitizable or illicit information I prefer someone expend effort to read it. It took effort to write it.

That said, I'm more in favor of j_sum's method. Hand written notebooks, know locations, accountability. Almost anything electronic is guaranteed to eventually be opened, especially if you piss off the wrong people. It is more convienient to electronically save your data in my opinion. It is more secure to have a physical notebook.




View user's profile View All Posts By User
Sulaiman
International Hazard
*****




Posts: 3697
Registered: 8-2-2015
Location: 3rd rock from the sun
Member Is Offline


[*] posted on 6-8-2017 at 23:42


Quote: Originally posted by JJay  
What do you do to keep your lab notebook secure?


I do not like taking my laptop into my lab so I use a real paper notebook.
If you are arrested on suspicion of wrong-doing, you will probably give up your password anyway.

My lab notebook is mildly incriminating
(I've made nitrocelulose and flash powder, and distilled alcohol (though not for consumption as my religion forbids it) etc.
The buk of my experiments are what proves that I'm an amateur mad scientist - not a cook or terrorist, so I have nothing to gain by encrypting my lab notebook.

Maybe you should use alchemical symbols, or your own version, or paint a picture with all of the clues hidden within ?
OR if you think that other readers might get the wrong impression - don't put it in your regular lab notebook !




CAUTION : Hobby Chemist, not Professional or even Amateur
View user's profile View All Posts By User
JJay
International Hazard
*****




Posts: 3440
Registered: 15-10-2015
Member Is Offline


[*] posted on 7-8-2017 at 01:00


I think j_sum1 keeps track of grades, so he certainly has taken measures to keep students from changing them. Not to brag at all, but I had absolutely no trouble whatsoever figuring out how to break into the gradebook software in high school, and while I never did anything nefarious with that knowledge (I demonstrated it for the IT department), somehow I doubt things have changed all that much. But perhaps j_sum1 has some techniques he can share with us :)

The idea of writing in secret code is interesting, but it would have to be very easy to master or no one would bother.

(Oh and I should probably mention that some time before I started keeping my lab notebook in electronic form, my physical lab notebook was stolen with my car when a thief took it for a joyride. While I did get it back, I can only imagine what the thief must have thought if she read it. That's not exactly why I started keeping my notebook in electronic form on an encrypted drive, but it was certainly in the back of my mind.)



[Edited on 7-8-2017 by JJay]




View user's profile View All Posts By User
chemplayer...
Legendary
***




Posts: 191
Registered: 25-4-2016
Location: Away from the secret island
Member Is Offline

Mood: No Mood

[*] posted on 7-8-2017 at 01:38


External HD encrypted disc + independently encrypted file containing lab notes (in excel using salted SHA hash and AES-256).

Just because you're paranoid doesn't mean they won't be out to get you at some point in the future!




Watch some vintage ChemPlayer: https://www.bitchute.com/channel/chemplayer/
View user's profile View All Posts By User
JJay
International Hazard
*****




Posts: 3440
Registered: 15-10-2015
Member Is Offline


[*] posted on 7-8-2017 at 02:42


Good ideas. It looks like LibreOffice supports Excel-compatible encryption as well. My lab notebook is just a text file, but I can definitely see some advantages to using a more advanced document format.




View user's profile View All Posts By User
woelen
Super Administrator
*********




Posts: 8014
Registered: 20-8-2005
Location: Netherlands
Member Is Offline

Mood: interested

[*] posted on 7-8-2017 at 03:31


If I had to hide my labnotes from other persons, then I would quit my hobby immediately and dispose of my chemicals and equipment today.

I have a paper temporary labbook and I make notes in that if I do experiments. Every now and then, I enter the experiments in my website as text-only experiments, which everyone can view.
If I get a new chemical, I add it to the list of available chemicals, and if I do experiments, worth making notes of, the notes finally end up in the website. I keep the paper notes, but I consider them only as temporary thing and they are not ordered in some specific way (just chronological).

Have a look at this page: http://woelen.homescience.net/science/chem/exps/index_texton...

Nothing encrypted, publicly available, searchable.

This is an example of a single experiment: http://woelen.homescience.net/science/chem/exps/expshow.cgi?...

[Edited on 7-8-17 by woelen]




The art of wondering makes life worth living...
Want to wonder? Look at https://woelen.homescience.net
View user's profile Visit user's homepage View All Posts By User
JJay
International Hazard
*****




Posts: 3440
Registered: 15-10-2015
Member Is Offline


[*] posted on 7-8-2017 at 03:36


My major concern was that I didn't want a guest reading about a synthesis of chloroform. There's nothing really wrong with making chloroform, but it does carry a stigma among non-chemists.



View user's profile View All Posts By User
j_sum1
Administrator
********




Posts: 6324
Registered: 4-10-2014
Location: At home
Member Is Offline

Mood: Most of the ducks are in a row

[*] posted on 7-8-2017 at 04:46


This topic seems to have touched a nerve.

My initial comment was mostly in jest -- it does take some skill to decipher my scrawlings. You would need to be fairly motivated to read some pages. I guess there are two issues being discussed here: (a) Do you encrypt personal information and if so how? (b) Is a lab notebook something that should be encrypted?

On the first topic...
Yes there are occasions where stuff should be encrypted. And it does not have to be because you feel you have something to hide. Keeping away prying eyes is a way of keeping yourself safe and gives you liberty to express yourself as you see fit without having to concern yourself with how that information might be misused. Taking steps to ensure privacy does not imply nefarious intent.
As for method...
I am sure that there are multiple ways to encrypt data. It can't be that hard to find a method that meets your security requirements. There is added security if no one knows the method that you have used.
That said, security of files is not the totality of data security. You can have multiple layer 256 bit encryption with a high entropy 64 character password and still be vulnerable to a keylogger or someone standing over your shoulder.
Good practice in this area is part and parcel of the modern age.


The better question is whether a lab notebook should be encrypted. I think a lot comes down to the reasons for keeping a lab book in the first place.
In my situation it is 95% for my own benefit -- to keep a record of what I am doing, what my results were and so forth. There really is not anyone in my vicinity who has (a) the desire to read it or (b) the ability to understand what it means. So the whole issue of privacy is pretty much moot. I could leave it on the coffee table and it would not make a shred of difference.
The other 5% of the reason comes down to the issue of justifying myself or explaining my actions if I ever should need to. I have twice been visited by police to check out my lab. The fact that I have an open lab journal speaks volumes about my intentions and activities. That is my security. And should I ever have to defend myself in court then the journal attests to my innocence. A paper journal is an advantage here since there is no way that it can be altered or redacted. Dated, sequential pages with different pens and used and the occasional spill cannot be fabricated in the same way that a digital file can. Of course a court would need a good reason to subpoena it -- as they would a digital journal. And of course under those circumstances the courts do have the authority to demand decryption under penalty of contempt of court. So all that technical jiggery-pokery may be to no avail anyway.
Another plus for the paper document is that I can draw diagrams. Also when I am visited by police I can get them to sign and date the book. I have done this and have also pasted the officer's business card on the page. The less I look like a meth lab the better.

The only good reason I can see for going digital is the ability to include digital photos and video in my journal. At the moment I simply annotate a reference to information stored in other forms. I cannot see a good reason for me to encrypt. And if I did it would not be any more sophisticated than a password protected zip file. No one else can access the data on my laptop as it is and I see little need to go to extraordinary lengths.

[Edited on 7-8-2017 by j_sum1]
View user's profile View All Posts By User
JJay
International Hazard
*****




Posts: 3440
Registered: 15-10-2015
Member Is Offline


[*] posted on 7-8-2017 at 06:20


In the U.S., the constitution says that they would not be permitted to hold me in contempt of court for denying them access to my drive. That's not to say that under some circumstance that isn't that far-fetched that some corrupt or incompetent, low-level judge wouldn't try, necessarily, but that wouldn't go over well for the judge, and most judges aren't actually that bad.

Some European countries require encryption key disclosure and some do not. I'm pretty sure that in his country, woelen cannot be compelled to give up encryption keys for his own documents. In Australia, you can be punished for up to two years for failure to disclose an encryption key under court order. In the U.K., whether you can be compelled to give up an encryption key depends on the nature of the crime that is charged.

I'm not quite sure how to interpret the laws on encryption key disclosure in Canada.

To me, it's not a question of whether I should encrypt my lab notebook. I've been encrypting my lab notebook for months. I have the right to do it, and I don't have to justify it to anyone.




View user's profile View All Posts By User
j_sum1
Administrator
********




Posts: 6324
Registered: 4-10-2014
Location: At home
Member Is Offline

Mood: Most of the ducks are in a row

[*] posted on 7-8-2017 at 07:53


Quote: Originally posted by JJay  
To me, it's not a question of whether I should encrypt my lab notebook. I've been encrypting my lab notebook for months. I have the right to do it, and I don't have to justify it to anyone.

Sure you don't.
But really, what is the purpose? You could equally well have an unencrypted notebook and choose not to show anyone.

My angle is that encryption goes against the spirit of why I keep a notebook in the first place. In my situation I cannot see any real upside to encryption and I do see some potential downsides. Not the least of these is what people may infer (rightly or wrongly) by my being secretive. There are other negatives as well. Some are safety related.


I am not attempting to change your mind. (I doubt I could.) IMO it is just not the wisest course of action. You can "keep it secret, keep it safe" without appearing like you are hiding something. From a practical standpoint, how likely is it that someone is going to be trawling through your hard drive without your consent anyway?
View user's profile View All Posts By User
karlos³
International Hazard
*****




Posts: 1520
Registered: 10-1-2011
Location: yes!
Member Is Offline

Mood: oxazolidinic 8)

[*] posted on 7-8-2017 at 08:52


I´ll keep my handwriting as encryption, works like a charm!
Always had a worse handwriting ever, now I made it deliberately worse over the decades, to the point of having trouble deciphering things twelve years ago :P
View user's profile View All Posts By User
JJay
International Hazard
*****




Posts: 3440
Registered: 15-10-2015
Member Is Offline


[*] posted on 7-8-2017 at 10:06


I had the box with the encrypted drive sitting around idle for months before I started keeping my lab notebook on it. Otherwise I might have used something like a password-protected zip file. Of course password protection on a zip file won't stop anyone who is really determined :)



View user's profile View All Posts By User
battoussai114
Hazard to Others
***




Posts: 235
Registered: 18-2-2015
Member Is Offline

Mood: Not bad.... Not bad.

[*] posted on 7-8-2017 at 13:01


While encrypting your notebook will do little more than give you that snuggly fell of false safety, if you're determined on doing it go with a LUKS encryption with a detached header stored in a flashdrive you keep on you most of the time... (Don't forget to cry when said drive is thrown in with the laundry and you loose your data forever).
Now, keeping an encrypted notebook and having a home lab is 158% sure to get whatever law enforcement unit that visits your place to want to come back with a warrant for that computer. Best case scenario you have to give them your keys and they'll find nothing of interest. Worst case scenario is the same except you'll be in jail due to your suspicious behavior while they do that.

Lastly, since you're nowhere as big of a deal as you imagine, I'd strongly advise you stick to security by anonymity and just leave your notes in a locked drawer if you don't want casual readers snooping in.

[Edited on 7-8-2017 by battoussai114]




Batoussai.
View user's profile View All Posts By User
JJay
International Hazard
*****




Posts: 3440
Registered: 15-10-2015
Member Is Offline


[*] posted on 7-8-2017 at 14:15


The only real problem I see with using a flash drive is that they aren't designed to handle the sheer number of read/write cycles required for virtual memory, and you might not want to have unencrypted data in RAM swapped to an unencrypted disk. Sure, the error rate might be only 0.000000000001% after a million read/write cycles, but that is completely unacceptable for virtual memory. And while in this country people can't be compelled to give up encryption keys, it would of course be illegal everywhere to pull the drive out of the computer and smash it if under investigation.

Do you think it is hard for a forensic technician to look through your virtual memory after your computer is powered down? It's not.




View user's profile View All Posts By User
battoussai114
Hazard to Others
***




Posts: 235
Registered: 18-2-2015
Member Is Offline

Mood: Not bad.... Not bad.

[*] posted on 7-8-2017 at 14:19


Detachable header in flashdrive =/= data in the flashdrive.




Batoussai.
View user's profile View All Posts By User
 Pages:  1  

  Go To Top