instruction stringlengths 0 29.8k ⌀ |
|---|
null |
> As hashes are fixed length, does that mean that even if not specified when creating the password, all login systems would need to have some sort of maximum input length (although probably very high)?
At least some hash algorithms have some limit to the input length, though those are usually astronomically high, so... |
null |
> As hashes are fixed length, does that mean that even if not specified when creating the password, all login systems would need to have some sort of maximum input length (although probably very high)?
At least some hash algorithms have some limit to the input length, though those are usually astronomically high, so... |
null |
To compute the number of possible arrangements of the queens on a 8 by 8 board, you can compute the following:
Number of ways of placing 8 queens on the board / Number of ways of arriving at each unique configuration of the queens
i.e.
(64 × 63 × 62 × 61 × 60 × 59 × 58 × 57)/(8 × 7 × 6 × 5 × 4 × 3 × 2 × 1) =... |
A lot has already been said and I agree with most of it. But there is one thing I don't see mentioned:
Theoretically a collision can occur between two strings that are both much shorter than the output from the hash, so if you should use this as an argument for having a limit on the length of the passwords, you shou... |
null |
Recently learning some core register modifications and made a loop-program that calculates the gcd. Any way to improve/shorten this version I came up with? Input for x and y go into x1 and x2 and output will be in x3. Example gcd(x1, x2) = x3
If x1 = 12, x2 = 15, then x3 = 3
Okay,now my code:
X3 := x1;
X4 :... |
Loop-Program possible modifications |
|turing-machines| |
null |
null |
Given the fact that there is the class of problems solvable in polynomial time P I was wondering if anyone has tried to categorize them even further. Has anyone looked into problems that, for example, can be solved in $n^2$ time, as a whole, as a class of problems?
By that I mean are there any theorems that can give... |
Is there any characterisation of problems solvable in $n^2$ time |
|time-complexity|polynomial-time| |
Basically I am asking if we know necessary and sufficient conditions for a problem to be solvable in, for example, $n^2$ time. Or if not, if there are any theorems on whether or not a broad class of problems can be solved in $n^2$. |
I am now considering the impossibility of black-box reductions between error-correcting codes and universal hashing without multiplicative overhead in depth. I could hardly find any classical papers on the limits of black-box reductions of boolean circuits. Are there any such literature that is worth referring to? |
Are there any typical papers on the impossibility of black-box reduction of circuits? |
|complexity-theory|circuits|cryptography|research| |
In cryptography there are two problems which are part of the foundation of modern public key cryptography. Both of them can be solved in polynomial time on quantum computers. I am talking about:
- **FACT**
**Given:** A composite number, i.e. a positiv integer which is the product of some prime numbers: $x = p... |
Yes, you can definitely use machine learning to predict the likelihood of an order being shipped. This prediction can be helpful for various purposes, such as optimizing inventory management, improving logistics, and providing better customer service by anticipating delays.
Here's an example of how you could approac... |
I've been trying to solve a variation of this problem https://stackoverflow.com/questions/62389658/best-time-to-buy-and-sell-stocks-when-allowing-consecutive-buys-or-sells
You are allowed to either buy 1 share or sell any number of shares that you own, or not make any transaction in each time period. Find the maximu... |
Ignoring that fact that passphrases are salted, and assuming that you are looking for a collision with one specific user.
If passphrases are randomly drawn from ASCII, then each character is represented by about 6.55 bits. As such, once the cleartext passphrase exceeds about 625 characters it is likely that more tha... |
I think I have found a working idea, however this is only a draft.
Take your n×m grid and split it into 3×3 squares starting from the upper-left corner until there are borders of size either 4 or 2 on two sides. If the border is of size 4 add 2 boxes 2×3, if it is of size 2 add only 1 2×3 box.
Some examples would... |
I think I have found a working idea, however this is only a draft.
Take your n×m grid and split it into 3×3 squares starting from the upper-left corner until there are borders of size either 4 or 2 on two sides. If the border is of size 4 add 2 boxes 2×3, if it is of size 2 add only 1 2×3 box.
Some examples would... |
> As hashes are fixed length, does that mean that even if not specified when creating the password, all login systems would need to have some sort of maximum input length (although probably very high)?
At least some hash algorithms have some limit to the input length, though those are usually astronomically high, so... |
Yes, passwords need maximum length, but not because of collision risk (see other answers regarding collisions).
Reason for setting length maximum password - possibility of denial of service attack.
Someone might start feeding petabytes into password field, pushing your setup to CPU/memory limits, which would impa... |
null |
In the slides' based animation given for backtracking, [here][1] (with code [here][2], in the [web-page
][3]); have few doubts, in the code restated below, and the execution as shown in the call #5.
int e() {
char* save = next;
if(eat('(')&&e()&&
eat('+')&&e()&&eat(')')... |
Doubts in backtracking function animation, for call sequence flow |
|compilers|backtracking| |
null |
null |
This is Petersons's solution for critical section problem. I want to test mutual exclusion, progress and bounded waiting for it. Of course, it satisfied all three.
Process0
while(true)
{
intendToEnter0=true;
turn=1;
while(intendToEnter1==T && turn==1);
critical section
... |
How to test progress and bounded waiting in Peterson's algorithm? |
|operating-systems|concurrency|synchronization| |
Indeed, all hash functions do produce output of a fixed length, regardless of the length of the input. This does mean that there's a theoretical possibility of collisions — two different inputs producing the same hash. However, for cryptographic hash functions like SHA-256, the number of possible hash values is so larg... |
From time to time I see systems that don't allow passwords longer than 8 chars:
isn't that a security risk? What am I missing, here, that might have lead to such decision? |
What reason could a system have to limit the length of a password to 8 chars? |
|authentication| |
Given:
L := {w elementof {0,1}* : w=(010 | 10)(10 | t'), with t' elementof L}
What words can we build with these rules?
01010, 1010, what else?
Does the t' allow 010010? |
Understanding Language L |
|formal-languages| |
|hash|hashing|security|authentication| |
Yes, absolutely, it is poor design from a security perspective. You're not missing anything. It could result from historical inertia (a lousy excuse) or from ignorance.
See [What technical reasons are there to have low maximum password lengths?](https://security.stackexchange.com/q/33470/971) and https://cs.stacke... |
The question is confusing, but I think what you are getting at is that you need to enforce temporal consistency when you evaluate your method.
In particular, a machine learning model takes as input (a feature vector) and produces output (a prediction). In your case, the feature vector contains information about pas... |
No. There is no* limit on the length of the input to for most* good cryptographic hash functions. As a result, password hashing can support passwords of unlimited length and do not need to impose a limit on the maximum length of the password.
Of course collisions are possible and exist, but they are believed to be... |
I can understand your confusion. Strictly speaking, this is not a valid definition of $L$, because it is circular: it defines $L$ in terms of itself. So I can understand why you are confused.
I think one more precise way to define the language $L$ would be to say that $L$ is some language that satisfies the equati... |
The definition is recursive.
For the base cases (ignoring $t'$), we consider $(010|10)10$, or $010\,10|10\,10$.
Then, letting $t'$ take these values, we add the four combinations $010\,01010|010\,1010|10\,01010|10\,1010$.
Next, eight combinations, $010\,010\,01010|010\,010\,1010|010\,10\,01010|010\,10\,1010|10... |
The definition is recursive.
For the base cases (ignoring $t'$), we consider $(010|10)10$, or $010\,10|10\,10$.
Then, letting $t'$ take these values, we add the four combinations $010\,010\,10|010\,10\,10|10\,010\,10|10\,10\,10$.
Next, eight combinations, $010\,010\,010\,10|010\,010\,10\,10|010\,10\,010\,10|01... |
null |
I can understand your confusion. Strictly speaking, this is not a valid definition of $L$, because it is circular: it defines $L$ in terms of itself. So I can understand why you are confused.
I think one more precise way to define the language $L$ would be to say that $L$ is some language that satisfies the equati... |
null |
You should never store a password, even encrypted, or salted, or salted and encrypted. So for storage, the password length wouldn't matter. Your passwords should be salted and hashed; salting makes sure that an attacker cannot use pre-calculated tables, cannot detect weak passwords, and cannot find weak passwords after... |
I'm currently reading a paper for a literature review related to NLP and its research employs a dilated LSTM model.
What is the difference between this and a regular LSTM, or more specifically what does the dilation do?
I read a couple of papers explaining dilated RNN but it doesn't resonate with me. (this one in... |
Dilated LSTM vs LSTM |
|machine-learning|neural-networks|natural-language-processing|classification| |
null |
In the slides' based animation given for backtracking, [here][1] (with code [here][2], in the [web-page
][3]); have few doubts, in the code restated below, and the execution as shown in the call #5.
#include <stdio.h>
char *next;
int calls = 0;
int eat(char c) {
calls++;
if (... |
An uninhabited type is a type for which a value cannot be created no matter what you do, even disregarding encapsulation boundaries.
I'm going to use Rust as an example, because it does have uninhabited types. Rust has enums, for example:
```rust
enum Color {
Red,
Yellow,
Rgb(u8, u8, u8),
}
```
... |
null |
null |
If $a(n),b(n)=O(g(n))$ then without more information, all you can say is $a(n)-b(n)=O(g(n))$, even if the asymptotic constants are the same and are tight.
Even worse, if $a(n),b(n)=\Theta(g(n))$ then without more information, all you can say is $a(n)-b(n)=O(g(n))$, even if the respective tightest upper and lower asy... |
Yes, passwords need maximum length, but not because of collision risk (see other answers regarding collisions).
Reason for setting maximum length - possibility of denial of service attack.
Someone might start feeding petabytes into password field, pushing your setup to CPU/memory limits, which would impact other ... |
My question:
* What $P \not= NP$ or $P = NP$ could imply about arbitrary Turing machines and arbitrary computations? I assume that a partial and incomplete, but objective answer to this question exists (e.g. based on the literature, most popular research directions). Take a single arbitrary program/computation. Wha... |
What could $P = NP$ imply about arbitrary Turing machines? |
In my reference [Page 22, Algorithms by Sanjoy Dasgupta, Christos H. Papadimitriou, and Umesh V. Vazirani,][1] it says that
>given $x$ and $y$ are two numbers of $n$ bits long, then the sum of $x$ and $y$ is $n+1$ bits long, and the total running time for the addition algorithm is therefore of the form $c_0+c_1n$, w... |
Justify that total running time for the addition algorithm is of the form $c_0+c_1n$ |
|algorithms|time-complexity| |
Strictly speaking, the claim is wrong, as nothing is said about the time for addition of two bits and a possible carry. This time might depend on the particular bit values and even not be the same for every bit.
Anyway, if we admit that the time does not depend on the numbers at all, it can only be a linear functio... |
null |
Strictly speaking, the claim is wrong, as nothing is said about the time for addition of two bits and a possible carry. This time might depend on the particular bit values and even not be the same for every bit.
Anyway, if we admit that the time does not depend on the numbers at all, it can only be a linear functio... |
You should never store a password, even encrypted, or salted, or salted and encrypted. So for storage, the password length wouldn't matter. Your passwords should be salted and hashed; salting makes sure that an attacker cannot use pre-calculated tables, cannot detect weak passwords, and cannot find weak passwords after... |
null |
According to the book " Operating Systems Concepts " , 9th edition, page 207, we have the following statement :
> Obviously, a nonpreemptive kernel is essentially free from race
> conditions on kernel data structures, as only one process is active in
> the kernel at a time.
My question is, According to the sta... |
Nonpreemptive kernels in OS |
|operating-systems| |
By definition, a non-preemptive kernel runs one process at a time, and that process runs until it willingly yields control back to the kernel. Running a non-preemptive kernel on a multi-processor system implies that only one processor runs the kernel and processes, the other processor may be used for other purposes th... |
There is good evidence that what you are asking about does not occur.
Specifically, there are computable $A,B$ such that $\mathsf{P}^A=\mathsf{NP}^A$ and $\mathsf{P}^B\not=\mathsf{NP}^B$ (this is the [Baker-Gill-Solovay](https://people.engr.tamu.edu/j-chen3/courses/637/2020/reading/p8.pdf) theorem). The standard (an... |
There is good evidence that what you are asking about does not occur.
Specifically, there are computable $A,B$ such that $\mathsf{P}^A=\mathsf{NP}^A$ and $\mathsf{P}^B\not=\mathsf{NP}^B$ (this is the [Baker-Gill-Solovay](https://people.engr.tamu.edu/j-chen3/courses/637/2020/reading/p8.pdf) theorem). The standard (an... |
As the title says, is there a formal grammar characterization of the class of one-way stack languages? |
What is a formal grammar equivalent to one-way stack automaton? |
|formal-languages|automata|formal-grammars| |
Another strong NP-completeness proof is a simple reduction from [distinct 3-partition][1] problem.
**Distinct 3-partition**
>
> **Input:** A set $X = \{a_1,a_2,\ldots,a_{3n}\}$ of positive distinct integers, and a positive integer $B$ where $\Sigma_{i=1}^{3n} a_i = nB$, and $B/4 < a_i < B/2$, where $1 \le i \le 3n... |
Another strong NP-completeness proof is a simple reduction from [distinct 3-partition][1] problem.
**Distinct 3-partition**
>
> **Input:** A set $X = \{a_1,a_2,\ldots,a_{3n}\}$ of positive distinct integers, and a positive integer $B$ where $\Sigma_{i=1}^{3n} a_i = nB$, and $B/4 < a_i < B/2$, where $1 \le i \le 3n... |
Another strong NP-completeness proof is a simple reduction from [distinct 3-partition][1] problem.
**Distinct 3-partition**
>
> **Input:** A set $X = \{a_1,a_2,\ldots,a_{3n}\}$ of positive distinct integers, and a positive integer $B$ where $\Sigma_{i=1}^{3n} a_i = nB$, and $B/4 < a_i < B/2$, where $1 \le i \le 3n... |
Another strong NP-completeness proof is a simple reduction from [distinct 3-partition][1] problem.
**Distinct 3-partition**
>
> **Input:** A set $X = \{a_1,a_2,\ldots,a_{3n}\}$ of positive distinct integers, and a positive integer $B$ where $\Sigma_{i=1}^{3n} a_i = nB$, and $B/4 < a_i < B/2$, where $1 \le i \le 3n... |
Another strong NP-completeness proof is a simple reduction from [distinct 3-partition][1] problem.
**Distinct 3-partition**
>
> **Input:** A set $X = \{a_1,a_2,\ldots,a_{3n}\}$ of positive distinct integers, and a positive integer $B$ where $\Sigma_{i=1}^{3n} a_i = nB$, and $B/4 < a_i < B/2$, where $1 \le i \le 3n... |
Consider the following leader election algorithm election of a synchronous ring with a known network size $n$ (simultaneous wakeup and uni-directional communication):
- The leader is the node with the minimal ID
- The algorithm works in phase - each phase is of length $n$
- in the $i$th phase, only the node with $... |
Algorithm for leader election in synchronous ring with a known network size $n$ with phases of length $\frac{n|{m}$ |
|algorithms|complexity-theory|graphs|distributed-systems| |
In my reference [Page 22, Algorithms by Sanjoy Dasgupta, Christos H. Papadimitriou, and Umesh V. Vazirani,][1] it says that
>given $x$ and $y$ are two numbers of $n$ bits long, then the sum of $x$ and $y$ is $n+1$ bits long, and assuming that each individual bit of this sum gets computed in a fixed amount of time, t... |
Algorithm for leader election in synchronous ring with a known network size $n$ with phases of length $\frac{n}{m}$ |
A type $A$ is inhabited if there exists a term $t$ of type $A$.
In typed programming languages with recursion all types are inhabited. Given any type `A`, consider the term `f()` where `f : unit → A` just calls itself:
```
function A f() { return f(); }
```
(Sure, `f()` cycles, but it has type `A`)
Side comme... |
The reason is saving space. In the old days every byte was precious, and security didn't matter because everyone was a nice person. |
There is good evidence that what you are asking about does not occur.
Specifically, there are computable $A,B$ such that $\mathsf{P}^A=\mathsf{NP}^A$ and $\mathsf{P}^B\not=\mathsf{NP}^B$ (this is the [Baker-Gill-Solovay](https://people.engr.tamu.edu/j-chen3/courses/637/2020/reading/p8.pdf) theorem, although there's ... |
null |
aSDASDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF |
{"Voters":[{"Id":98102,"DisplayName":"Irishmanluke"}],"DeleteType":1} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.