Skip to content

Instantly share code, notes, and snippets.

View jonasschneider's full-sized avatar

Jonas Schneider jonasschneider

View GitHub Profile
--- ssh/channel.go 2013-02-17 13:00:21.000000000 +0100
+++ /usr/local/Cellar/go/1.0.3/src/pkg/code.google.com/p/go.crypto/ssh/channel.go 2013-02-16 21:25:52.000000000 +0100
@@ -303,7 +303,7 @@ func (c *serverChan) read(data []byte) (
}
for {
- if c.dead() {
+ if c.theySentEOF || c.theyClosed || c.dead() {
return 0, io.EOF, 0
}
require 'net/http'
require 'nokogiri'
def scrape
uri = URI('http://www.reddit.com/')
page = Net::HTTP.get(uri)
document = Nokogiri::HTML(page)
data = {}
Praktikum Protocol Engineering WS 2013/2014
Aufgabenblatt
Jonas Schneider <[email protected]>
Gruppe 3
Ausgabe: 05.11.2013, Abgabe: 15.11.2013, 12:00
1 Prototypischer Protokollentwurf
=================================
.globl _main
_main:
mov $0x0e, %ah
mov 'a', %al
int $0x10
jmp _main
# Tell the assembler to output 16-bit code; x86-compatible CPUs start in the 16-bit Real Mode.
.code16gcc
# Export the _start symbol, which is by convention the entry point for the .text
# section. Our makefile places the beginning of the text section at the start of
# the MBR. At runtime, the BIOS loads the MBR into address 0x7c00.
.globl _start
_start:
mov $(startup_message - _start + 0x7c00), %bx
call print_str_BX
(qemu) info registers
EAX=1f201f1f EBX=00002003 ECX=000001f4 EDX=00000000
ESI=00000004 EDI=000b8004 EBP=00000000 ESP=00006f1c
EIP=00007d5a EFL=00000012 [----A--] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA]
CS =0008 00000000 ffffffff 00ef9a00 DPL=0 CS64 [-R-]
SS =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA]
DS =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA]
FS =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA]
GS =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA]
# Tell the assembler to output 16-bit code; x86-compatible CPUs start in the 16-bit Real Mode.
.code16gcc
# Export the _start symbol, which is by convention the entry point for the .text
# section. Our makefile places the beginning of the text section at the start of
# the MBR. At runtime, the BIOS loads the MBR into address 0x7c00.
.globl _start
_start:
# Apparently, the 20th bit of memory addresses is always disabled on PCs by default
# because of ridiculous backwards compat. Also, enabling/disabling this
# http://en.wikipedia.org/wiki/INT_13H#INT_13h_AH.3D42h:_Extended_Read_Sectors_From_Drive
# http://www.ctyme.com/intr/rb-0708.htm
# http://stackoverflow.com/questions/19866549/int-13h-not-reading-sectors-from-virtual-disk
# Load the second boot stage from the first HDD,
# using the BIOS routine "INT 13h/AH=42h: Extended Read Sectors From Drive".
mov $0x42, %ah
mov $0x80, %dl # drive index (0x80 is first drive)
[22:32] <sokrates> does having a "perfect" PRNG trivially lead to perfect symmetric crypto?
[22:33] <sokrates> imagine this situation: A and B both have a copy of this perfect PRNG
[22:33] <sokrates> they both seed it with the shared key
[22:33] <catid> in the OTP sense yes i believe so
[22:33] <sokrates> and then alice simply XORs the PRNG's output with the plaintext
[22:34] <catid> but you can still misuse that kind of cipher construction: you can reuse the PRNG seed to encrypt the same data twice
[22:34] <Riastradh> If the key was chosen uniformly at random and the PRNG's output is indistinguishable from uniform random, then yes. This is how stream ciphers work.
[22:34] <catid> or the seed can have insufficient randomness itself
[22:34] == Platyp [~flatline@2607:f470:22:8:beae:c5ff:fe5a:903f] has joined ##crypto
[22:35] <catid> an online game cheater can filter out all packets with length = 53 to stop something from going through, even though they cannot decrypt the data

Keybase proof

I hereby claim:

  • I am jonasschneider on github.
  • I am jonasschneider (https://keybase.io/jonasschneider) on keybase.
  • I have a public key whose fingerprint is 0D07 E065 758B 05EB E9C0 9DFD AC7F 2AEB 434F 894A

To claim this, I am signing this object: