a question for pythonistas about securely wiping a file

[chan] general
Aug 12 12:04

Creating and reading files with python is simple. I want to create a file in python code that will be exactly 16 KiB (not KB). The application will routinely write to this file but the size of the file will always be exactly 16 KiB. Encryption keys will be written to the file and regularly changed. Then the file will be wiped multiple times with patterns before the new key data is written in encrypted format. I know how to do this. It's very simple to measure string length and ensure the exact data is written. It's very simple to write the loops for the wiping algorithms. I don't need help with that. That said, I want the file, after initial creation, to always occupy the exact same sectors on disk, with a few extra sectors reserved in case of sector damage or disk curruption. So when the file is written and re-written repeatedly, I want it to always be on the same sectors in this reserved range so key data is not spread out and recoverable by forensics techniques. Even though the key data will be written encrypted I do not feel that is enough. When old keys are disposed, those old keys must truly disappear via various overwriting patterns. Is there a way to achieve this in python?

[chan] general
Aug 12 12:36

Creating and reading files with python is simple. Creating and re written in this file will be written and reading files with python? It's very simple to always be exactly KiB; not spread out and ensure The file but the wiping algorithms. That: is written and re written in python is will be written encrypted I want the key data is written and reading files with that: is written. Creating and re written to this. So key data is simple; to write to do not KB, the file is enough. Creating and ensure regularly changed. It's very simple to this: file but the file is enough. So key data is written and ensure the loops for the exact data is simple: to always be written and reading files with that will be written: in python is written; to measure string length and reading files with a file will be wiped multiple times with that is written: and regularly changed. Creating and reading files with that will be written encrypted I know want the application will be exactly KiB not KB, The exact data is enough. Creating and ensure the file and re written and re written encrypted I want to create a few extra sectors in this file and ensure reading files with python is simple to always be written encrypted I want to the file but the do want to write to always create a file but the key data is written and ensure the file, will be written in python is enough.

[chan] general
Aug 12 13:08

Yes and no. Yes, as you can use ctypes or Python extension or subprocess to utilize libraries or other programs that can do what you want. No, as you really are just delegating to an existing library or program which can be done in other languages just as well. Also you may have to communicate with the storage device at the the driver level to get the desired assurance the firmware is not transparently writing to another sector due to corruption or to evenly spread writes across the physical sectors.

[chan] general
Aug 12 13:25

I have a lot of RTFM to do. I was hoping python had disk magic to avoid libraries. 8( Thank you, sir. I suppose the next best thing is an encrypted sqlite / gzip / lzma type container which would cause extra trouble for forensic recovery since it would be double encrypted.

[chan] general
Aug 12 13:54

This question is related to OS too. For example I was reading ext4 defragmentation manual recetly, and according to it OS stores writable data in buffer, and in certain cases like enabled online defrag - buffer will be written to new place on the disk to combine some file chunks together.

[chan] general
Aug 13 03:02

Have a look at sqlcipher

[chan3] general
Aug 13 19:08

Chances are, if its on "spinning rust" with a modern disk, controller and interface standard you've had it - security wise. For particularly sensitive data. Less so for flash and sram storage. Ideally have all your interim cleartext datafiles entirely in volatile DDRAM ( ramdisk ). Unless you dealing with truly enormous data sets DDRAM is cheap enough to contain all your data and even the Virtual Machine running the sql server ans client code. Also make sure that swap isn't active in a way likely to copy any of it to permanent disk storage.

[chan] general
Aug 14 04:56

not if you have lvm + luks and encrypted swap.

[chan] general
Aug 14 10:09

You got that right +1 all the way.

[chan] general
BM-2cW67GEKkHGonXKZLCzouLLxnLym3azS8r

Subject Last Count
Katie Price's 10-year-old daughter Aug 23 13:23 1
developers control few nodes, and hardcode their IPs into client Aug 23 10:22 3
where does pybitmessage get peers IPs from? Aug 23 10:06 2
fuck you retard Aug 23 09:54 4
FBI Arrests Hacker Who Hacked No One (new american "democracy") Aug 23 08:23 1
all of them? Aug 23 08:20 6
How To Build A ProxyHam Aug 23 07:35 1
Highlighting Titan's Hazes Aug 23 07:07 15
pretty teen girl Aug 23 06:59 13
Tesla vs. Einstein Aug 23 02:33 2
bitcoin giveaway Aug 22 20:12 3
Your privacy - VPN & FireFox (+ other Gecko browsers)* rev. 0.3.3 Aug 22 15:44 1
Hidden services Aug 22 15:35 10
Firefox :D Aug 22 14:09 1
DuckDuckGo Aug 22 13:04 1
HWRNG - /dev/random is a good entropy source Aug 22 07:46 4
NSA is in the right Aug 22 06:48 3
BM-2c Aug 22 01:09 1
gostcoin transaction Aug 21 20:26 11
SUPER QUALITY MARIJUANA Aug 21 16:27 4
لا إله إلا الله Aug 21 14:28 5
test Aug 21 13:43 2
then and now Aug 21 08:30 1
non-mathematical crypto Aug 21 07:48 12
UNIX Textbook Collection Aug 21 06:52 1
Hash the Bible to check for tampering Aug 21 04:34 2
fighting fascism? Aug 21 04:14 1
Hmmmm.... Aug 21 04:01 1
Outlaw Cryptography! Aug 21 03:57 1
Cool Aug 20 18:59 1
Solar eclipse Aug 20 18:03 4
What if? Aug 20 18:02 3
Hello to you all Aug 20 16:28 2
just to say hi Aug 20 15:19 4
address nuked Aug 20 12:28 6
Can someone please help me with bitmessage?? Aug 20 10:06 26
how many use this? Aug 20 09:05 15
Crypto math question Aug 20 07:21 3
Is anyone even online at this moment? Aug 20 05:26 3
Next-Level Metasploit Aug 19 22:18 1
hi Aug 19 19:16 2
a BM in the raw Aug 19 05:38 2
How to evade taxes? Aug 19 05:35 7
The world is an illusion Aug 19 02:42 3
any body help me? Aug 18 19:51 39
YAFI - Yet Another Freenet Index Aug 18 12:20 2
Chloë Grace Moretz Aug 18 10:34 1
Charlottesville Aug 18 05:21 3
sisters Aug 17 06:55 1
Find someone to rape Aug 17 02:50 14
0.0005 BTC Aug 16 20:49 8
Peachkisser's Erotic Stories and Blog Aug 16 15:07 4
Nara Aug 16 12:55 1
Alika Aug 16 12:39 1
[DELETED] Aug 16 11:01 1
[DELETED] Aug 16 10:50 1
btc-e Aug 16 10:47 3
[DELETED] Aug 16 10:09 1
[DELETED] Aug 16 09:37 4
Sally and her daughter Flea Aug 15 20:15 12
I've been here Aug 15 12:42 1
Learn from the former commies Aug 15 10:07 2
Kat Aug 15 10:00 1
Aktie 0.5.19 Aug 15 07:17 1
decss.c Aug 14 20:13 2
YOU FUCKERS !!!!!!!! Aug 14 19:36 8
HELP I NEED 400$ CC DUMPS Aug 14 19:08 3
[DELETED] Aug 14 16:34 2
HELP MONEY RUN TO AMERICA Aug 14 12:46 5
a question for pythonistas about securely wiping a file Aug 14 10:09 9
Aktie 0.5.18 Aug 14 07:54 2
The Government Siezed two truckloads of Tesla's Papers and Inventions Aug 14 05:00 3
Hacking emails Aug 14 04:57 2
NNTP over tor Aug 13 19:01 4
free cc Aug 13 16:40 3
The Gravity Myth Aug 13 16:15 1
Need cc cashout guide Aug 13 15:08 4
Your privacy - VPN & FireFox (+ other Gecko browsers)* rev. 0.3.2 Aug 13 14:04 2
Your privacy - VPN & FireFox (+ other Gecko browsers)* rev. 0.3.1 Aug 13 13:36 2
Where? Aug 13 12:46 3
Video Course and Tutoring on Carding and whatnot Aug 13 12:03 2
Make USD94 PER HOUR working from home. Aug 13 08:39 10
A Cypherpunk's Manifesto Aug 13 05:42 1
Bitmessage announcement Aug 13 05:42 4
Battle for sanity. Aug 13 02:50 3
Lift the nation up Aug 12 22:50 4
forbid the sending of acks Aug 12 21:14 2
Query for Crypto Junkies Aug 12 16:56 18
No real privacy apps Aug 12 14:54 16
cp Aug 12 14:41 4
Safe OTP over a wire Aug 12 13:58 1
a question for pythonistas about securely wiping a virus Aug 12 12:20 2
Virtuous Aug 12 11:31 1
Help with altcoins Aug 12 08:22 2
FIREWALL, IPTABLES, BLOCKING INCOMING REQUEST Aug 11 23:22 3
Blue whale game Aug 11 11:53 1
Francesco Scavullo - Brooke Shields 1975 Aug 11 11:51 1
Your privacy - VPN & Firefox (+ other Gecko browsers)* [Updated] Aug 11 10:17 1
Your privacy - VPN & Firefox (+ other Gecko browsers)* Aug 11 08:01 5
Stop sending these shits Aug 11 07:08 1