| #import "@preview/cetz:0.2.0" | |
| #let d = cetz.draw | |
| #let offset(anchor, x: 0, y: 0) = { | |
| (v => cetz.vector.add(v, (x, y)), anchor) | |
| } | |
| #let default-colors = (red, orange, yellow, green, blue, purple, fuchsia, gray) | |
| #let color-boxed(..args) = { | |
| set text(0.8em) | |
| box( |
| # Depends on FZF | |
| # Remove the default cd alias | |
| Remove-Alias cd | |
| # Create a new cd function | |
| function MyCD { | |
| Set-Location @args | |
| $curtime =$(Get-Date -Format "yyyy-MM-dd HH:mm:ss") | |
| $dict = @{ | |
| Id = "30" |
| # This Action autogenerates PDFs and standalone HTML | |
| # out of your Overleaf projects (or any LaTeX-live project). | |
| # | |
| # PDF generator: pdflatex | |
| # HTML generator: htlatex | |
| # | |
| # Both tools come from LaTeX Live and are executed on | |
| # the latest version of Ubuntu. | |
| # | |
| # Given: |
| // insert everything in the browser console and a "file" button will appear in the submenu | |
| function addfilebutton() { | |
| if (document.querySelector("#file2xy") || // exists already | |
| !document.querySelector(".dcg-action-newimage")) // unclick case | |
| return | |
| pic = document.querySelector(".dcg-action-newimage").parentNode | |
| var div = document.createElement('div'); | |
| div.innerHTML = '<style>.dcg-calculator-api-container .dcg-icon-new-file::before { content: "\\e205";}</style><div class="dcg-new-item dcg-action-newfile" onclick="file2tab.click()"><i class="dcg-icon-new-file dcg-expression-icon" aria-hidden="true"></i>Datei2tab</div><input id="file2tab" type="file" style="display: none" onchange="tabFromFile()"></div>' | |
| pic.after(div) |
| %% | |
| % Copyright (c) 2017 - 2021, Pascal Wagler; | |
| % Copyright (c) 2014 - 2021, John MacFarlane | |
| % | |
| % All rights reserved. | |
| % | |
| % Redistribution and use in source and binary forms, with or without | |
| % modification, are permitted provided that the following conditions | |
| % are met: | |
| % |
Since the snippet utilises callouts, the sidebar disappears after a note is scrolled enough for the callout to be outside rendering range, i.e. it's best used for smaller notes. Smaller sidebar sizes are better in this case because there's more scroll area.
Use the capacities-sidebars.css as a snippet and paste the markdown into a new note.
| param( | |
| [Parameter()] | |
| [String]$text, | |
| [Int]$rate | |
| ) | |
| Add-Type -AssemblyName System.speech | |
| $speak = New-Object System.Speech.Synthesis.SpeechSynthesizer | |
| $speak.SpeakSsml(($text)) | |
| $speak.Rate = $rate |
Here's the scenario: We want to craft two different messages with the same MD5 hash, and a specific CRC32 checksum, simultaneously.
In other words, we want an MD5 collision attack and a CRC32 preimage attack.
This might seem like a contrived scenario, but it's exactly the one I faced while producing my PNG hashquine (Yes OK maybe that's also a contrived scenario, cut me some slack).
On its own, a CRC32 preimage attack is trivial. You can craft a 4-byte suffix that gives any message a specific checksum, calculated using a closed-form expression (which I am too lazy to derive, not even with assistance from Z3). It's not an attack per-se, since CRC32 was never meant to be cryptograpically secure in the first place.

