I have recently gotten interested in cryptography, so I looked some things up.  I thought, why even use AES or DES or any other complex way for encrypting data when there are far simpler ways, like just generating a random (pseudorandom) bitstream, and XOR'ing it with the data or secret message? The point is, if you have a random enough bitstream, you can just XOR the data.   Of course, you're the only one who will know the stream.  So why use all sorts of encryption if you have these simpler, easier ways of doing things? I'm new to cryptography, so this question may sound a bit naive.
RSA, DES, AES, etc., all use (relatively) complicated mathematics to encrypt some message with some key. For each of these methods, there have been several documented vulnerabilities found over the years. Some even believe that there is a vulnerability in AES known only to the NSA.  On the other hand, the one-time pad is not only ridiculously simple, but also has been shown to be impossible to crack (if used appropriately).  Say you have some message to be encrypted with length n. Simply generate a random string with length m where m is at least as large as n, and perform modular addition of the random string onto the message.  As long as the random string is generated with a high-enough-quality random number generator, and as long as the same one-time pad isn't reused, it should be impossible to crack.  If this is true, all we would need to perfect are fast, cryptographically secure deterministic random number generators. Use the key as a starting seed for the RNG and you have a powerful uncrackable encryption scheme which is simple to understand and implement.  Blum-Blum-Shub is a fast, cryptographically secure PRNG, and there are others too.  I have written a C++ program which uses two 2048-bit primes (which match the necessary criteria) for Blum-Blum-Shub and uses a password which the user enters - converted into a starting seed - to run byte-wise modular addition. The process is fast, deterministic, and if the literature I have read is correct then it should be very secure.  So why is so much time and effort invested in coming up with convoluted encryption cyphers when mathematics shows that the simplest is often the best?
I am trying to create a schema page in LaTeX. It shall look like this.   How can I create schema code which look like this image? There should be also a click to go function. When the user clicks on the user_schema link he should be redirected to that page.  What classes I can use for this? Any suggestions would be appreciated.    \documentclass{article} \usepackage[utf8]{inputenc}  \begin{document} \maketitle  \section{User schema} \mySchema{Users} {     _id: ObjectId - Id do registro     name: String - Nome do usuário     date: Date - Data de Cadastro     ren_date: Date - Data de renovação do Cadastro     email: String - Lorem ipsum dolorsitamet, consecteturadipisicingelit, sed do eiusmodtemporincididunt ut labore et dolore magna aliqua. Ut enim ad minimveniam, exercitationullamcolaborisnisi ut aliquipexeacommodoconsequat. Duisautereprehenderit in voluptatevelit esse cillumdolore eu fugiatnullapariatur. Occaecatcupidatat non proident, sunt in culpa quiofficiadeseruntmollit.     access_log: Array [          {              date: String - Data da ocorrência.             user: ObjectId - Usuário que executou.             action: String - Ação Executada.         }         {              date: String - Data da ocorrência.             user: ObjectId - Usuário que executou.             action: String - Ação Executada.         }     ]     \link{group}{group_id}: ObjectId - Id do grupo. } \end{document}   Here is the image how should it appear: Is it worth encrypting email addresses in the database? What is the distance a creature or player can travel if they have multiple types of movement speeds? Calculate battery life Inspired by :  In my answer, I had stated that Patronuses appear to not be physical beings because they have no effect on anything other than Dementors.     They don't cause leaves to stir in the movies. They passed straight through the tent. They don't appear to be bound by normal laws pf physics and can travel great distances almost immediately (Shacklebolt was presumably in London when his Patronus issued the warning). They can apparently walk across water without sinking (as they did in The Prisoner of Azkaban). They can jump, walk, and float in mid-air (as seen in the Room of Requirement in the movie version of The Order of the Phoenix). They make no footprints in lightly powdered snow (The Deathly Hallows Chapter 19) and make no sound of crunching snow as Harry does (further down the same page in Chapter 19).   I stated incorrectly that the only place in canon where there is an exception is with Dementors, where the Patronus physically fends them off with its horns.  A Dementor is clearly a physical being, if it prised Dudley's mouth open and (in the movie anyway) physically slid open the train door.)   Based on comments and further thought, I can think of at least two other examples when a Patronus interacts physically with a physical being.   As pointed out by Slytherincess, a Patronus can fend off a Lethifold (Living Shroud). When training, the Patonus took form against a Boggart, which had taken the form of a Dementor.   All three of these things have, AFAIK, only three things in common (but I may be off).   They are evil They are magical They are, indeed, physical beings.   So the question is, why can a Patronus interact with all three of these, but seems to have no physical effect on everyday things? When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it. Can't flag or close questions on all sites Whenever I try to flag or close a question here, when clicking the submit button the button gets disabled, three dots animating and nothing really happens.  JS console show a single error:  Flagging:     Uncaught TypeError: Cannot read property 'flagSubmitting' of undefined    Closing:     Uncaught TypeError: Cannot read property 'closeSubmitting' of undefined   Please fix, programming questions and spam are beginning to pile up. :(  Update: appears to work fine from within the review system, but otherwise it's the same on Stack Overflow as well How is the system call in Linux implemented? When I invoke a system call in user mode,how did the call get processed in OS?  Does it invoke some some executable binary or some standard library?  If yes,what kind of thing it needs to complete the call? How to manually typeset text in parallel on facing pages in (Lua)LaTeX? I want to typeset a bilingual text in parallel on facing pages using LuaLaTeX. The existing solutions to automate this task have proven unsatisfactory as they don't allow for footnotes (parallel), don't allow for different font sizes of the two parallel texts (), or generally provide a poor result of aligned text chunks (eledpar).  As the text is not too long, I really came to consider breaking the pages myself. For this to do, I have to solve the following problem(s):  Consider two facing pages with ending paragraphs of different length. The following paragraphs should then begin at the same vertical position such that the beginnings of these following paragraphs face each other. For this to accomplish on has   to determine the position of the end of the longer paragraph on its page to have the means to let the next parallel paragraphs both begin at the identified position.   Is this something which is doable? Are there mechanisms provided by (Lua)LaTeX to determine positions on a page and to begin typesetting at a specific position on a page?  EDIT: The following example illustrates the task. Here the latin paragraph starting with "O tempora, o mores" (third chunk of text in the code) should begin at the facing position of the beginning of the paragraph "Shame on the age..." (fifth chunk).  \documentclass[a6paper]{scrbook} \usepackage{fontspec} \usepackage[latin,english]{babel} \begin{document} \mbox{}\pagebreak  \noindent\selectlanguage{latin}{\large quo usque tandem abutere, Catilina, patientia nostra? quam diu etiam furor iste tuus nos eludet? quem ad finem sese effrenata iactabit audacia? nihilne te nocturnum praesidium Palati, nihil urbis vigiliae, nihil timor populi, nihil concursus bonorum omnium, nihil hic munitissimus habendi senatus locus, nihil horum ora voltusque moverunt? patere tua consilia non sentis, constrictam iam horum omnium scientia teneri coniurationem tuam non vides? quid proxima, quid superiore nocte egeris, ubi fueris, quos convocaveris, quid consili ceperis quem nostrum ignorare arbitraris?\par\newpage}  \noindent\selectlanguage{english}When, O Catiline, do you mean to cease abusing our patience? How long is that madness of yours still to mock us? When is there to be an end of that unbridled audacity of yours, swaggering about as it does now?  Do not the nightly guards placed on the Palatine Hill — do not the watches posted throughout the city — does not the alarm of the people, and the union of all good men — does not the precaution taken of assembling the senate in this most defensible place — do not the looks and countenances of this venerable body here present, have any effect upon you? Do you not feel that your plans are detected? Do you not see that your conspiracy is already arrested and rendered powerless by the knowledge which every one here possesses of it? What is there that you did last night, what the night before — where is it that you were — who was there that you summoned to meet you — what design was there which was adopted by you, with{\parfillskip0pt\relax\par}  \noindent\selectlanguage{latin}{\large O tempora, o mores!\par\newpage}  \noindent\selectlanguage{english}which you think that any one of us is unacquainted?  Shame on the age and on its principles! \end{document} Age limit is too strict How to read a text file reversely with iterator in C# I need to process a large file, around 400K lines and 200 M. But sometimes I have to process from bottom up. How can I use iterator (yield return) here? Basically I don't like to load everything in memory. I know it is more efficient to use iterator in .NET. He who must not be named? (aka Anyone can ping everyone in chat) For some or other reason, typing @ᔕᖺᘎᕊ in a chat room pings everyone who's been in that chat room for the last 7 days...    Seems to work in all chat rooms (I only tested 2 as I don't want to upset too many people...)  How should we proceed? Let $f$ be an entire function and $L$ a line in $\mathbb{C}$ such that $f(\mathbb{C})\cap L=\emptyset$. Show that $f$ is constant function.  If $f$ is not constant  then $f(\mathbb{C})$ is dense set in $\mathbb{C}$, but how can I use that line does not intersect the image set? How do I resolve a recurrence relation when the characteristic equation has fewer roots than terms? I know how to solve "simple" recurrence relations. For instance, say you have:  $$c_0 = 20$$ $$c_1 = 30$$ $$c_n = 3 c_{n-1} - 2 c_{n-2}$$  We can write the characteristic equation as:  $$3x^{n-1} - 2x^{n-2} = x^n$$  Solving this with $n=2$, we get $x = 1$ or $x = 2$. This lets us write the relation $c_n = \alpha_1 1^n + \alpha_2 2^n$, and we can solve for $\alpha_1$ and $\alpha_2$ with the initial states $c_0$ and $c_1$.  However, this depends on the fact that $3x^{n-1} - 2x^{n-2} = x^n$ has two roots.  Now, I'm stuck on another problem where the characteristic equation has fewer roots than terms.  Say I have this recurrence relation instead:  $$a_0 = 0$$ $$a_1 = 2$$ $$a_2 = −1$$ $$a_n = 9a_{n-1} - 15a_{n-2} - 25a_{n-3}$$  The characteristic equation would be:  $$9x^{n-1} - 15x^{n-2} - 25x^{n-3} = x^n$$  However, solving with $n=3$, we only get two roots: $x=-1$ or $x=5$. There are not enough roots to write a relation in the form of $a_n = \alpha_1 r_1^n + \alpha_2r_2^n + \alpha_3r_3^n$. How do I proceed? I need to simulate the warning:  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!  @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!   I have two Linux machines and when I do ssh from Linux1 to Linux2, ssh accepted and reports no problem.  But because some of testing, I want to simulate the - Identification Has Changed error  So what I need to edit on the remote server in order to create the problem?  what I did until now is to change the knpwn_hosts on both machine but its not creating the problem.  I get this:   key_read: uudecode AAAAB3NzaC1y3jrzG62xyHrb3qxc9eYpg1Cp1PrRElTFfYbEHsRfTZU21S8kO5/Tq+ED8=  failed  key_read: uudecode AAAAB3NzaC1y3jrzG62xyHrb3qxc9eYpg1Cp1PrRElTFfYbEHsRfTZU21S8kO5/Tq+ED8=  failed  The authenticity of host 'ste1 (10.106.164.111)' can't be established.  RSA key fingerprint is 84:82:2b:80:ca:3f:57:c7:8c:14:44:dd:b9:70:e5:d8.  Are you sure you want to continue connecting (yes/no)? How should duplicate questions be handled? What should I do when I see a question that is a duplicate of another one?   Should I answer it? Should I downvote it? Should I comment? Should I edit the question to indicate it's a duplicate? If I can, should I (vote to) close the question? What happens when I vote to close as duplicate? Or: Why did a comment with my name on it just appear? Should I flag it for moderator attention? What about similar or related questions? DOM event precedence What order of precedence are events handled in JavaScript?  Here are the events in alphabetical order...   onabort - Loading of an image is interrupted onblur - An element loses focus onchange - The user changes the content of a field onclick - Mouse clicks an object ondblclick - Mouse double-clicks an object onerror - An error occurs when loading a document or an image onfocus - An element gets focus onkeydown - A keyboard key is pressed onkeypress - A keyboard key is pressed or held down onkeyup - A keyboard key is  released onload - A page or an image is  finished loading onmousedown - A mouse button is  pressed onmousemove - The mouse is moved onmouseout - The mouse is moved off  an element onmouseover - The mouse is moved  over an element onmouseup - A mouse button is  released onreset - The reset button is  clicked onresize - A window or frame is  resized onselect - Text is selected onsubmit - The submit button is  clicked onunload - The user exits the page   What order are they handled out of the event queue?  The precedence is not first-in-first-out (FIFO) or so I believe. What is wrong with using inline functions? While it would be very convenient to use inline functions at some situations,  Are there any drawbacks with inline functions?  Conclusion:  Apparently, There is nothing wrong with using inline functions.  But it is worth noting the following points!   Overuse of inlining can actually make programs slower. Depending on a function's size, inlining it can cause the code size to increase or decrease. Inlining a very small accessor function will usually decrease code size while inlining a very large function can dramatically increase code size. On modern processors smaller code usually runs faster due to better use of the instruction cache.  The speed benefits of inline functions tend to diminish as the function grows in size. At some point the overhead of the function call becomes small compared to the execution of the function body, and the benefit is lost  There are few situations where an inline function may not work:   For a function returning values; if a return statement exists. For a function not returning any values; if a loop, switch or goto statement exists.  If a function is recursive.   The __inline keyword causes a function to be inlined only if you specify the optimize option. If optimize is specified, whether or not __inline is honored depends on the setting of the inline optimizer option. By default, the inline option is in effect whenever the optimizer is run. If you specify optimize , you must also specify the noinline option if you want the __inline keyword to be ignored. There is currently no way to delete questions or answers in the iOS app, even with the required Trusted User privilege. We can edit and vote, but not delete.  Can this option please be added to the app? Notation: Why write the differential first?