Skip to content

Instantly share code, notes, and snippets.

View v6ak's full-sized avatar

Vít Šesták v6ak

View GitHub Profile
@v6ak
v6ak / 53usb
Last active September 14, 2016 20:29
USB in Qubes dom0
#!/bin/sh
MODS="xhci_pci xhci_hcd ehci_pci ehci_hcd"
suspend_usb()
{
rmmod $MODS
}
resume_usb()
{
@v6ak
v6ak / LICENSE
Created April 5, 2016 09:23
My WIP modifications of keycaps from https://www.thingiverse.com/thing:468651/#files
See https://creativecommons.org/licenses/by-nc-sa/3.0/
@v6ak
v6ak / gist:c89518c4ee412ed07b72
Created March 8, 2016 10:03
Wüstenrot inconsistent scan results
~/public_drown_scanner-master% ./scanner.py 194.213.48.213 443
Testing 194.213.48.213 on port 443
194.213.48.213: Case 4d; Empty server_finished
194.213.48.213: Server is NOT vulnerable with cipher RC2_128_CBC_EXPORT40_WITH_MD5, Message: 4d: no tls
194.213.48.213: Case 4d; Empty server_finished
194.213.48.213: Server is NOT vulnerable with cipher RC4_128_EXPORT40_WITH_MD5, Message: 4d: no tls
194.213.48.213: Case 7; Symmetric key did not successfully verify on server finished message
194.213.48.213: Server is NOT vulnerable with cipher RC4_128_WITH_MD5, Message: 7: no tls
@v6ak
v6ak / dvm.desktop
Created December 9, 2015 21:39
/usr/share/applications/dvm.desktop
[Desktop Entry]
Encoding=UTF-8
Name=DVM delegated webbrowser
GenericName=Web Browser
Exec=qvm-open-in-dvm %u
Terminal=false
X-MultipleArgs=false
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;
@v6ak
v6ak / exp.sh
Created December 5, 2015 14:38
Processing of stderr without merging it with stdout
#!/bin/bash
# prepare queues
d=$(mktemp -d)
o="$d/out"
e="$d/err"
mkfifo "$o"
mkfifo "$e"
# cat the queues to outputs
@v6ak
v6ak / after crypttab update
Last active March 1, 2023 19:20
Encrypting swap and largetmp with a random key; see https://groups.google.com/forum/#!topic/qubes-users/X0BBZ-kfix0 for the context
$ sudo /usr/lib/systemd/system-generators/systemd-cryptsetup-generator
$ sudo systemctl daemon-reload
$ sudo systemctl restart cryptsetup.target
@v6ak
v6ak / 01_less-locales
Created November 13, 2015 20:08
A hack for Debian not having unneeded locales. $ cat /etc/dpkg/dpkg.cfg.d/01_less-locales
# remove all locales
path-exclude /usr/lib/locale/??
path-exclude /usr/lib/locale/??/*
path-exclude /usr/lib/locale/??.*
path-exclude /usr/lib/locale/??.*/*
path-exclude /usr/lib/locale/??_*
path-exclude /usr/lib/locale/??_*/*
path-exclude /usr/lib/locale/???_*
path-exclude /usr/lib/locale/???_*/*
@v6ak
v6ak / 00noswap
Created September 17, 2015 17:42
#!/system/xbin/sh
swapoff /dev/block/zram0
echo -n 0 > /sys/block/zram0/disksize || true
echo -n 1 > /sys/block/zram0/reset
# cat /sys/block/zram0/disksize

I'd like to suggest something, but the correct solution depends on the purpose of the Crypto library. On one hand, it looks somewhat high-level (e.g. the output is String of printable characters and the API is simple), on some others, is does not look so high-level (the need of knowing the specifics of the mode of operation). It also depends on how much do we want to be backward compatible.

What output overhead is acceptable? In this case, I am mainly talking about some overhead with a constant upper bound. This overhead might be needed for padding, authentication and IV. The choice of CTR suggested that such several-bytes constant overhead might be too much, but I don't know the reasoning about the choice.

Random read/write: The CTR choice looks also like intended for some random read or write operations (note that random write with CTR is insecure except some special cases), but the API does not provide anything like this. If random access is a concern, it adds some limitations to mode of operatio

$ sudo qubes-dom0-update --enablerepo=qubes-dom0-unstable qubes-gui-dom0
2015-05-24T12:34:16+0000
Using sys-firewall as UpdateVM to download updates for Dom0; this may take some time...
Running command on VM: 'sys-firewall'...
Loaded plugins: langpacks, post-transaction-actions, yum-qubes-hooks
Package matching qubes-gui-dom0-3.0.2-1.fc20.x86_64 already installed. Checking for update.
Nothing to do
Existing lock /var/run/yum.pid: another copy is running as pid 5308.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit