OpenLLM-France/wikimedia huggingface dataset:
# Cryptography/Scytale

The Scytale cipher is a type of transposition cipher used since the 7th century BCE. The first recorded use of the scytale cipher was by the Spartans and the ancient Greeks who used it to transport battle information between generals.

## Encryption Using the Scytale

The scytale encryption system relies on rods of wood with equal radiuses. The system is a symmetric key system where the radius of the rod is the key.
After establishing keys a messenger winds a strip of leather around the rod. Then he writes the message going across the rod, so that when he unwinds the leather the letters have been jumbled in a meaningless fashion.
Example: Suppose the rod allows you to write 4 letters around it in one circle and 5 letters down the side. Clear text: "Help me I am under attack" To encrypt one simply writes across the leather...
so the cipher text becomes, "HENTEIDTLAEAPMRCMUAK" after unwinding.

## Decryption Using the Scytale

To decrypt all you must do is wrap the leather strip around the rod and read across. Example: ciphertext: "HENTEIDTLAEAPMRCMUAK" Every fourth letter will appear on the same line so the cipher text becomes
Insert spaces and the plain text returns, "Help me I am under attack"
# Cryptography/Random Quality

"The higher the entropy of a random source, the better the quality of the random data it generates."
Many cryptographic algorithms call for a random source, either in key-generation, or some other primitive. Implementors must be extremely cautious in selecting that random source, or they will open themselves up to attack. For example, the only formally proven encryption technique, the one time pad, requires a completely random and unbiased key-stream that is at least as long as the message itself, and is never reused. There are many implicit complications presented in this requirement, as the only sources of "true randomness" are in the physical world (silicon decay is an example), and are impossible to implement in software. Thus, it is often only feasible to obtain pseudo-randomness. Pseudo-Random Number Generators, or PRNGs, use multiple sources that are thought to be difficult to predict (mouse movement, least significant digits of the computer clock, network statistics, etc.) in order to generate an entropy pool, which is passed through assorted algorithms which attempt to remove any biases, and then used as a seed for a pre-determined static set of numbers. Even with all of the sources of entropy, a determined attacker can usually reduce the effective strength of an implementation by cutting out some of the factors—for instance making educated guesses on the time. PRNGs that are thought to be acceptable for cryptographic purposes are called Cryptographically-Secure Pseudo-Random Number Generators, or CSPRNGs.

## Entropy

In terms of information theory, entropy is defined as the measure of the amount of information expressed in a string of bits. For example a traditional gender classification contains 1-bit of entropy as it can be represented using a 1 for males and a 0 for females. The quality of a random source is determined by just how much entropy it generates, if the entropy is less than the actual number of bits then there is some repetition of information. The more information that is repeated, or the shorter the period of some PRNG, the lower the entropy and the weaker and more predictable the source of randomness. Therefore in cryptography one seeks to get as close to perfect randomness as possible with the resources available - where a perfect random number generator creates a sequence of bits which are unpredictable no matter how large a sample of previously generated bits is obtained.

## Further reading

* Cryptography/Random number generation
* RFC 4086 "Randomness Requirements for Security"
# Cryptography/S-box

In cryptography, an S-Box (Substitution-box) is a basic component of symmetric key algorithms which performs substitution. In block ciphers, they are typically used to obscure the relationship between the key and the ciphertext — Claude Shannon's property of confusion. In many cases, the S-Boxes are carefully chosen to resist cryptanalysis.
In general, an S-Box takes some number of input bits, m, and transforms them into some number of output bits, n: an m×n S-Box can be implemented as a lookup table with $2^{m}$ words of n bits each. Fixed tables are normally used, as in the Data Encryption Standard (DES), but in some ciphers the tables are generated dynamically from the key; e.g. the Blowfish and the Twofish encryption algorithms. Bruce Schneier describes IDEA's modular multiplication step as a key-dependent S-Box.
Given a 6-bit input, the 4-bit output is found by selecting the row using the outer two bits (the first and last bits), and the column using the inner four bits. For example, an input "011011" has outer bits "01" and inner bits "1101"; the corresponding output would be "1001".
The 8 S-Boxes of DES were the subject of intense study for many years out of a concern that a backdoor — a vulnerability known only to its designers — might have been planted in the cipher. The S-Box design criteria were eventually published after the public rediscovery of differential cryptanalysis, showing that they had been carefully tuned to increase resistance against this specific attack. Other research had already indicated that even small modifications to an S-Box could significantly weaken DES.
There has been a great deal of research into the design of good S-Boxes, and much more is understood about their use in block ciphers than when DES was released.

## References

* ↑ Chandrasekaran, J. et al. (2011). "A Chaos Based Approach for Improving Non Linearity in the S-Box Design of Symmetric Key Cryptosystems". Advances in Networks and Communications: First International Conference on Computer Science and Information Technology, CCSIT 2011, Bangalore, India, January 2-4, 2011. Proceedings, Part 2. Springer. p. 516. ISBN 978-3-642-17877-1. {{cite book}}: Explicit use of et al. in: |authors= (help); Unknown parameter |editors= ignored (|editor= suggested) (help)CS1 maint: uses authors parameter (link)
* ↑ Coppersmith, Don (1994). "The Data Encryption Standard (DES) and its strength against attacks" (PDF). IBM Journal of Research and Development. 38 (3): 243–250. doi:10.1147/rd.383.0243. Retrieved 2007-02-20.{{cite journal}}: CS1 maint: ref duplicates default (link)
# Cryptography/SHA-1

The Secure Hash Algorithm SHA (Secure Hash Algorithm), based on the MD4 (Message Digest) algorithm created by Ronald L. Rivest of the MIT, was designed by the NIST (National Institute of Standards and Technology), along with the NSA (National Security Agency). It is defined by three distinct SHA algorithms, labeled SHA-0, SHA-1, and SHA-2.
SHA-1 was published by NIST in 1995 as FIPS PUB 180-1. and was considered a cryptographically secure one-way hash algorithm and used in many applications including TLS and SSL ("https://"), SSH, PGP, Git, Mercurial, Monotone, etc. until theoretical weaknesses were found in 2005.
While at least up-to 2015 no actual SHA-1 collision had been publicly acknowledged, in 2006, NIST and other organizations deprecated the use of SHA-1. They recommend that people should stop using SHA-1 and transition to a hash function without those theoretical weaknesses, such as SHA-2 or SHA-3.

## Further reading

* ↑ U.S. Department of Commerce: National Institute of Standards and Technology. "FIPS PUB 180-1". 1995.
# Cryptography/Statistical Weaknesses
## Letter Frequency

Whenever you consider any available language, it gives information about the frequency of letters that occur most frequently in it. The same matter is more enough for cryptanalysis (process of discovering ciphertexts) which is more beneficial when encryption is performed using the Conventional Classical Encryption Techniques.
This gives statistical information of data that cryptanalysts can use in order to decrypt the encrypted data, provided the language in which data is present is known.
# Cryptography/Social Engineering and Coercion

In encryption, the weakest link is almost always a person.
While you could spend many hours attempting to decipher an encrypted message, or intercept a password, you can easily trick a person into telling you this information.
Suppose Bob works for a large company and encrypts document E with key K. Suppose Eve, wishing to decrypt document E, calls Bob and pretends to work for the company's information security department. Eve would pretend a problem existed with the computers, servers, etc. and ask Bob for his key, K, which she would use to decrypt E. This is an example of social engineering.
Randall Munroe in an xkcd comic once presented a scenerio in which bad guys find it more convenient to hit Bob with a $5 wrench until he gives up his key rather than attempt to break the crypto system.
# ETD Guide/Technical Issues

To efficiently and effectively implement an ETD program, involved institutions need to develop a suitable technical infrastructure – a side benefit and related goal of the initiative. This section outlines the key aspects of the technical portion of an ETD effort, covering production, dissemination, and access.
Next Section: Contexts: local, regional, national, global
# ETD Guide/Students/Using Style Sheets

Preparing a word document to be converted into an archivable form using the SGML or XML standard first of all means using word stylesheets. Usually the university provides these style sheets, as they contain university specific structuring and formatting.
In Word it is possible to distinguish between the information a document holds and the structure in which it is written. Style sheets provide the structure. They help you, for example, if you want to format all your headings for chapters with the same style.
If you use the style sheet heading1 (see picture below), than it may be possible to associate a certain formatting like text height: 14pt, text-font Arial, paragraph settings: left bound, leave 12 pt space after a heading, number the headings automatically with roman numbers, etc. with the structure element heading1.
You can see the left row within the word window. This is the so-called structured view, which you can get by choosing the Normal option under View. The names of the paragraph structures are displayed if you choose the point Options under Extras. Within the popup menu there is a possibility to set the width of the style sheet view. (see below). This is how it is displayed in German Word97, but is similar in other language word systems.
Next Section: Using Plug-ins: Bibliography Plug-in
# ETD Guide/Students/Writing in word processing systems

The following subsections explain in detail how to work with Word, Word Perfect, LaTeX, and FrameMaker. Note, however, that many tools rapidly become obsolete. Authors should work with current, supported versions of tools. Authors should refer to the content below as appropriate, but should seek other aid from their local institution as needed to prepare their ETD.
Next Section: Microsoft Word and Office 2007
# ETD Guide/Technical Issues/Backups; Mirrors

An archival infrastructure for ETD should not only consider document format or the use of digital signatures, but also a consequently run concept for mirroring and backups.
Mirrors ensure, that archives run stable, regardless of usage, bandwidth and location.
A common server concept for an ETD archive is the following one:
* Production server
* Archive Server (Storage Unit, like IBMs Tivoli Storage Management System)
* Public Archive server
* Archive Mirror at different geographical location.
The production server is the server that communicates with the users, especially the authors. Here the uploads and metadata processing is done.
The archive server ensures that a permanent incremental backup of the public archive server is done. Only system administrators have access to the archive server. This secures the access to the ETDs and their digital signatures. It prevents users from manipulating ETDs and their authenticity and integrity.
The public archive server itself is the server that is known as the document server from the outside. Here the ETDs can be access by users, the retrieval is available. We advise to secure this server with a special RAID (Redundant Array of Independent Disks) system, that allows a security in case of a hardware failure of the disk, that might be caused by extreme usage of the server. A RAID system holds internally 2 equal copies of the server distributed on independent hard disks. So if one copy cannot be accessed due to a head crash or other hardware inconsistencies, the second copy will take over functionality and operate as the first copy. The user itself will not realize, which copy is actually in use.
Additionally to the archive server there should be another storage management system server, an archive mirror that mirrors the original archive. This is important if due to environmental accidents e.g. fire, earthquake or anything else destroys the original archive server. So a data loss, or the loss of the full archive can be prevented. This backup archive should be located at another geographical position, even at another continent.
Next Section: Dissemination of ETDs
# ETD Guide/Students/Typical workflow, local policies and procedures

Apart from the ADT Program support processes described above, local workflow and policies within the ADT membership will vary. Typically, what is most common across all members is that the libraries are driving the ADT Program through their respective institutions, providing all levels of support and provision of information, and that only research theses are acceptable - i.e. PhD or Masters by research.
What is less common is the local procedures insofar as how theses are deposited to the local server, who has the authority to approve/make public and administer the program and how the ADT theses are integrated within the local IT infrastructure. Access to theses also varies between institutions. While most encourage and actively support free and unrestricted access, some take a much more conservative approach and restrict all theses to the local domain. Obviously, all institutions will apply some temporary restrictions to access if required, for reasons of patents pending, copyright and upcoming publications.
An example of workflow, policies & procedures at The University of New South Wales [UNSW] Library is as follows:
* UNSW Library provide support as required, see 3.4.1. above.
* When theses are deposited, auto alerts are sent to the student, supervisor, the ADT coordinator and the cataloguers
* The cataloguers are responsible for checking the theses are original and have been awarded. They edit the metadata to include appropriate thesaurus terms/subject headings. The cataloguers are also responsible for approving the theses and making them public. They also catalogue the theses into the local OPAC and the National Bibliographic Database. These ETDs are then available via the national distributed ADT database, the local view of the ADT database [i.e. UNSW-ETDs only], the local OPAC and the National Bibliographic database. Most are available unrestricted with a few restricted to the local domain due to copyright reasons
* Two separate units are responsible for the ADT Program at UNSW Library. The General Services Department's Learning Support Unit provides all support, promotion and associated information. The cataloguing department is responsible for administration of the ETDs when deposited to the server. The ADT coordinator at UNSW is also the overall coordinator and is responsible for liaising and guiding the program at the national level.
Next Section: Becoming a researcher in the electronic age
# ETD Guide/Students/Writing directly in SGML\XML

The desired situation for retrieving archivable ETDs would be the one, that authors write in an XML- editor, according to a Main-DTD, and choose those parts of the DTD, that are inevitable for their thesis or dissertation.
Some desktop publishing systems today provide an opportunity to save as SGML or XML. Investigations as to whether those tools are usable for such complex documents as a thesis or a dissertation led to the following conclusion:
* Writing in WordPerfect or FrameMaker+SGML enforces the author to learn new writing habits. While writing, they have to think about the structure of their documents, e.g., which part is a heading, which part is a definition list; or they have to think to add certain parts immediately to the document, like, references, table and figure captions, etc.
* While writing according to a specified DTD, the desktop publishing system often internally checks syntax correctness by using an XML parser. Some of those internal parsers are still not stable enough and may cause the system to crash, as experienced with WordPerfect 9.0. Those parsing procedures in between the active scientific thinking and writing often disturbs the authors.
* Most of the pure XML editors could not produce an appropriate and layouted printed copy or PDF file that would satisfy the approval of readers of the printed version of a document. Some of those editors simply fail to process large and complex documents.
* Most of the tools are not ready yet, especially in a sense that would allow to use user or domain specific DTDs. Staroffice and other tools support their own vendor specific DTD only.
Although the world of desktop publishing systems is actually changing, there are still too few tools that are sufficient in:
* The support and appearance of their graphical user interface,
* The provision of a certain amount of features normal word processors have, like automated numbering, colors, table management, link management, style sheets.
* The platform independence or cross-platform availability,
* The support of user specific DTDs, and standard DTDs, like TEI, Docbook, etc.,
* The export quality of produced XML: tables, tags,
* The stability of usage,
* Their commercial availability and price.
The following systems are able to export into SGML or XML:
Export with user specific DTD
* WordPerfect Version 7.0 (Corel) http://www.corel.com
* FrameMaker+SGML6.0 (Adobe) http://www.adobe.com
Export with system specific (vendor) DTD
* Openoffice (SUN / open source) http://www.openoffice.org
* AbiWord (AbiWord / open source) http://www.abisource.com
* Kword (KOffice, KDE Project / open source) http://www.kde.org
Conversion Tools
* Omnimark (Omnimark) (http://www.omnimark.com)
* MarkupKit (Schema) http://www.schema.de
* Majix (Tetrasix) http://www.tetrasix.com
* TuSTEP (RZ Uni Tübingen) http://www.uni-tuebingen.de/zdv/tustep/index.html
(More information about SGML/XML tools can be found at: http://www.w3.org/XML/#software.)
Next Section: Preparing a PDF document
# ETD Guide/Students/Using Plug-ins: Bibliography Plug-in

Some word processing systems are extensible in different ways. One of them is the definition of macros written in some programming language. MS Word, for instance, uses Visual Basic for Applications as macro language). Another way to extend MS Word is by add-ins, applications built in some programming language that are inserted into Word’s runtime (like plug-ins in web browsers). This feature permits the development of added-value tools for writers. For instance, BibWord (http://mariachi.dsic.upv.es/bibword) is a bibliography management tool for MS Word 2000. The current version allows Word users to insert references from a bibliographic database and automatically generates the reference list at the end of a document. Macros also could be used to attach a form to the ETD document, the fulfillment of which would provide the ETD metadata from the word processing environment.
Next Section: Corel WordPerfect
# Electronics/RCL time domain2
## Example

Given the following values what is the response of the system when the switch is closed?
| R | L | C | V |
| 0.5H | 1kΩ | 100nF | 1V |
$\alpha ={\frac {R}{2L}}=1000$
$\omega _{n}={\frac {1}{\sqrt {LC}}}\approx 4472$
$v_{n}(t)=e^{-1000t}{\bigB_{1}\cos(4359t)+B_{2}\sin(4359t){\big ]}$
Solve for $B_{1}$ and $B_{2}$:
From equation \ref{eq:vf}, $v_{f}=1$ for a unit step of magnitude 1V. Therefore substitution of $v_{f}$ and $v_{n}(t)$ into equation \ref{eq:nonhomogeneous} gives:
$v_{c}(t)=1+e^{-1000t}{\bigB_{1}\cos(4359t)+B_{2}\sin(4359t){\big ]}$
for $t=0$ the voltage across the capacitor is zero, $v_{c}(t)=0$
$0=1+B_{1}\cos(0)+B_{2}\sin(0)$
$B_{1}=-1{\mbox{ (7)}}$
for $t=0$, the current in the inductor must be zero, $i(0)=0$
$i(t)={\frac {dv_{c}(t)}{dt}}C$
$i(0)=100\cdot 10^{-9}{\bige^{-1000t}{\big-4359B_{1}\sin(4359t)+4359B_{2}\cos(4359t){\big )}-1000e^{-1000t}{\bigB_{1}\cos(4359t)+B_{2}\sin(4359t){\big )}{\big ]}$
$0=100\cdot 10^{-9}{\big4359B_{2}-1000B_{1}{\big ]}$
substituting $B_{1}$ from equation \ref{eq:B1} gives
$B_{2}\approx -0.229$
For $t>0$, $v_{c}(t)$ is given by:
$v_{c}(t)=1-e^{-1000t}{\big\cos(4359t)+0.229\sin(4359t){\big ]}$
$v_{out}$ is given by:
$v_{out}=V_{in}-v_{c}(t)$
$v_{out}=Vu(t)-v_{c}(t)$
For $t>0$, $v_{out}$ is given by:
$v_{out}=e^{-1000t}{\big\cos(4359t)+0.229\sin(4359t){\big ]}$
# Electronics/RC transient

For a series RC consist of one resistor connected with one capacitor in a closed loop.

## Circuit Impedance

In Polar Form Z/_θ
    $Z=R\angle 0+{\frac {1}{\omega C}}\angle -90$
    $Z=|Z|\angle \theta ={\sqrt {R^{2}+({\frac {1}{\omega C}})^{2}}}\angle Tan^{-}1{\frac {1}{\omega RC}}$
In Complex Form Z(jω)
    $Z=Z_{R}+Z_{C}=R+{\frac {1}{j\omega C}}={\frac {1}{j\omega C}}(1+j\omega RC)$
    T = RC

## Differential Equation of circuit at equilibrium

    $C{\frac {dV}{dt}}+{\frac {V}{R}}=0$
    ${\frac {dV}{dt}}=-{\frac {1}{RC}}V$
    ${\frac {1}{V}}dV=-{\frac {1}{RC}}dt$
    $\int {\frac {1}{V}}dV=-\int {\frac {1}{RC}}dt$
    $\ln V=-{\frac {1}{RC}}t+C$
    $V=e^{{\frac {-t}{RC}}+C)=e^{C}\cdot e^{\frac {-t}{RC}}$
    $V=Ae^{\left({\frac {-t}{RC}}\right)}=Ae^{\left({\frac {-t}{T}}\right)}$

## Time Constant

    T = R C
    tV(t) % V$_o$ 0A = e$^C$ = V$_o$100% 1/RC.63 V$_o$60% V$_o$ 2/RCV$_o$ 3/RCV$_o$ 4/RCV$_o$ 5/RC.01 V$_o$10% V$_o$

## Angle Difference Between Voltage and Current

Current leads Voltage on an angle; Does this mean in measuring a angle of DC current causes a decrease in current? Let us take some time to understand the previous math in determing a factor of sinuous solution.
    $Tan\theta ={\frac {1}{\omega RC}}={\frac {1}{f}}{\frac {1}{2\pi RC}}=t{\frac {1}{2\pi RC}}$
Change the value of R and C will change the value of Angle Difference, Angular Frequency, Frequency and Time
    $\omega ={\frac {1}{RC}}{\frac {1}{Tan\theta }}$
    $f={\frac {1}{2\pi }}{\frac {1}{RC}}{\frac {1}{Tan\theta }}$
    $t=2\pi RCTan\theta$
u

## Application

When the switch is open, the initial voltage across the capacitor is zero. When the switch closes (which we will refer to as time zero) the capacitor charges via the resistor to $V_{0}$.
When the switch is closed, the circuit must follow the relationship:
    $V_{0}=v_{c}(t)+i_{c}(t)R$
    $V_{0}=v_{c}(t)+{\frac {dv_{c}(t)}{dt}}RC$
which is derived by analysing the circuit using Kirchoff's Voltage Law.
By letting $\tau =RC$ and rearranging the equation:
    ${\frac {dv_{c}(t)}{dt}}+{\frac {1}{\tau }}v_{c}(t)={\frac {1}{\tau }}V_{0}$
This is a first order linear differential equation with integrating factor:
    $e^{\int {\frac {1}{\tau }}dt}$
    $e^{\frac {t}{\tau }}$
Multiplying both sides by the integrating factor:
    ${\frac {dv_{c}(t)}{dt}}e^{\frac {t}{\tau }}+{\frac {1}{\tau }}v_{c}(t)e^{\frac {t}{\tau }}={\frac {1}{\tau }}V_{0}e^{\frac {t}{\tau }}$
Note that:
    ${\frac {d}{dt}}[e^{t/\tau }v_{c}(t)]={\frac {dv_{c}(t)}{dt}}e^{\frac {t}{\tau }}+{\frac {1}{\tau }}v_{c}(t)e^{\frac {t}{\tau }}$
Substituting and integrating both sides:
    $e^{\frac {t}{\tau }}v_{c}(t)=V_{0}e^{\frac {t}{\tau }}+K$
where K is the integration constant.
When t=0
    $v_{c}(0)=0$
Therefore:
    $K=-V_{0}$
When t>0 this gives:
    $e^{\frac {t}{\tau }}v_{c}(t)=V_{0}e^{\frac {t}{\tau }}-V_{0}$
    $v_{c}(t)=V_{0}-V_{0}e^{-{\frac {t}{\tau }}}$
    $v_{c}(t)=V_{0}(1-e^{-{\frac {t}{\tau }}})$
when t<0:
    $v_{c}(t)=0$