<p>The difficulty of reverse-engineering the algorithm seems to depend on how much of the keyspace has already been expired.</p>

<p>Say the algorithm of Mr. X is very restricted, so there are (say) only 10,000 potentially valid keys.
If Mr. X only recently started this company, so there are very few expired keys -- and hence few "false negatives" -- then reverse-engineering the algorithm may be relatively easy.
If Mr. X has already expired 9,000 of the potentially valid keys, and so we have 9 out of 10 "false negatives", then reverse-engineering the algorithm seems to be much more difficult.
And, of course, if Mr. X has already expired every potentially valid key except for the ones that Mr. Y and his collaborators already know, then the "taciturn oracle" will give him zero new information.</p>

CC BY-SA 3.0
2011-06-16T10:40:11.207Z
2011-06-16T10:40:11.207Z
David Cary
<p>It appears that only finitely many valid passwords can in fact be used. If the password language is finite, then there is no hope (as in this case, all of the valid passwords may be used, in which case the oracle always returns FALSE). </p>

<p>Otherwise, simply restrict the learning process to sufficiently large samples. As this is a finite requirement, it does not change the complexity of the problem.
You can use an exponential strategy to search for $N$ for sufficiently large. Try learning on queries $&gt; 2^n$; if the learning algorithms fails increment $n$.</p>

CC BY-SA 3.0
2011-06-16T17:50:59.047Z
2011-06-16T17:50:59.047Z
David Harris
<p>It seems you're trying to PAC learn a language by only seeing positive examples.  This is called "learning from positive examples (only)."  But you also have the power to get some of your own made-up examples labeled: if the oracle were fully truthful, then these would be membership queries, so your model would be known as "learning from positive examples and membership queries."  In this framework, there are some results - for example, <a href="http://portal.acm.org/citation.cfm?id=1282867.1282952">tree languages are learnable</a> (not secure).  DFA are not due to <a href="http://www.cis.upenn.edu/~mkearns/papers/crypto.pdf">crypto hardness results</a>. (Also see <a href="http://portal.acm.org/citation.cfm?id=103418.103420">this</a>.)</p>

<p>Of course, your setting isn't quite this.  Your membership queries are more limited.  It seems that then the known intractability results would transfer to your setting from the model I described, but the learnability results would leave you with some work to do.  But Mr. X's scheme is secure or not depending on the "pattern" he uses.</p>

<p>Also - it seems like a strange requirement to be able to prove "Mr. X's passwords are inherently unpredictable."  Isn't it usually enough to just be able to generate a new valid password to break such a system? But this seems to be the query to Mr. Y's algorithm itself...</p>

CC BY-SA 2.5
2010-10-26T15:28:02.087Z
Thanks for your answer. I don't really understand your last paragraph though: can the same not be said of any hard concept class? I mean, Mr. Y being lucky by guessing one password randomly does not imply he can do it again. But I must be missing your point.
Anthony Labarre
CC BY-SA 2.5
2010-10-26T16:29:15.030Z
I guess I would assume passwords to be "sparse," as in hard to guess. If you don't wish to assume that, then I'm only happy as my answer fits even better :)
Lev Reyzin
CC BY-SA 2.5
2010-10-26T13:19:51.150Z
2010-10-26T14:00:48.637Z
2010-10-26T14:00:48.637Z
Lev Reyzin
<p>My question is a bit generic, so I'm making up a nice story to justify it. Bear with me if it's not realistic ;-)</p>

<p><strong>Story</strong></p>

<p>Mr. X, the head of the computer security department at a big company, is a bit paranoid: he requires that all employees change their passwords once a month, in order to minimise the risks of identity or information theft. Moreover, he does not trust the employees to be able to come up with secure passwords. </p>

<p>Therefore, every month, he generates new passwords using a piece of software he wrote, and gives them to the employees so that they can log in again. But besides being paranoid, Mr. X is also a bit lazy: the passwords he generates all follow some pattern, and the algorithm used to allow people to log in only checks that the password "looks okay" according to that rule, and that it is not in the "expired list".</p>

<p>Unfortunately, his pretentious behaviour made a lot of people bitter, and one of them, Mr. Y, decides to prove him that he can crack his passwords. So, one night, he collects a few of them, and starts trying to design a learning algorithm for generating valid passwords, using his personal computer to verify them.</p>

<p><strong>Question</strong></p>

<p>The oracle used by Mr. Y is a bit strange, in that it tells him "the truth, but not the whole truth" (hence the "taciturn" adjective). More precisely: Mr. Y will know that a password is valid when his computer accepts it, but when a password is rejected, Mr. Y will not know whether or not it <em>could have been</em> valid: the password may be rejected because it does not correspond to some pattern, but it may also be rejected because it used to be valid but no longer is, according to Mr. X's "change once a month"-rule.</p>

<p>So, will Mr. Y ever be able to come up with anything in that setting? Or can we claim/prove that Mr. X's passwords are inherently unpredictable (as defined in the PAC learning setting, but maybe this concept exists in other frameworks)?</p>

<lg.learning>
Learning with "taciturn" oracles
Anthony Labarre
# Learning with "taciturn" oracles

(Asked by: username_0 on 2010-10-26)

My question is a bit generic, so I'm making up a nice story to justify it. Bear with me if it's not realistic ;-)

**Story**

Mr. X, the head of the computer security department at a big company, is a bit paranoid: he requires that all employees change their passwords once a month, in order to minimise the risks of identity or information theft. Moreover, he does not trust the employees to be able to come up with secure passwords.

Therefore, every month, he generates new passwords using a piece of software he wrote, and gives them to the employees so that they can log in again. But besides being paranoid, Mr. X is also a bit lazy: the passwords he generates all follow some pattern, and the algorithm used to allow people to log in only checks that the password "looks okay" according to that rule, and that it is not in the "expired list".

Unfortunately, his pretentious behaviour made a lot of people bitter, and one of them, Mr. Y, decides to prove him that he can crack his passwords. So, one night, he collects a few of them, and starts trying to design a learning algorithm for generating valid passwords, using his personal computer to verify them.

**Question**

The oracle used by Mr. Y is a bit strange, in that it tells him "the truth, but not the whole truth" (hence the "taciturn" adjective). More precisely: Mr. Y will know that a password is valid when his computer accepts it, but when a password is rejected, Mr. Y will not know whether or not it *could have been* valid: the password may be rejected because it does not correspond to some pattern, but it may also be rejected because it used to be valid but no longer is, according to Mr. X's "change once a month"-rule.

So, will Mr. Y ever be able to come up with anything in that setting? Or can we claim/prove that Mr. X's passwords are inherently unpredictable (as defined in the PAC learning setting, but maybe this concept exists in other frameworks)?

**Tags:** lg.learning

---

## 3 answers

### Answer by username_3 on 2010-10-26. Score: 12 | Accepted answer

It seems you're trying to PAC learn a language by only seeing positive examples. This is called "learning from positive examples (only)." But you also have the power to get some of your own made-up examples labeled: if the oracle were fully truthful, then these would be membership queries, so your model would be known as "learning from positive examples and membership queries." In this framework, there are some results - for example, [tree languages are learnable](http://portal.acm.org/citation.cfm?id=1282867.1282952) (not secure). DFA are not due to [crypto hardness results](http://www.cis.upenn.edu/~mkearns/papers/crypto.pdf). (Also see [this](http://portal.acm.org/citation.cfm?id=103418.103420).)

Of course, your setting isn't quite this. Your membership queries are more limited. It seems that then the known intractability results would transfer to your setting from the model I described, but the learnability results would leave you with some work to do. But Mr. X's scheme is secure or not depending on the "pattern" he uses.

Also - it seems like a strange requirement to be able to prove "Mr. X's passwords are inherently unpredictable." Isn't it usually enough to just be able to generate a new valid password to break such a system? But this seems to be the query to Mr. Y's algorithm itself...

> **Comments:**
> **username_0**: Thanks for your answer. I don't really understand your last paragraph though: can the same not be said of any hard concept class? I mean, Mr. Y being lucky by guessing one password randomly does not imply he can do it again. But I must be missing your point.  
> **username_3**: I guess I would assume passwords to be "sparse," as in hard to guess. If you don't wish to assume that, then I'm only happy as my answer fits even better :)  

---

### Answer by username_1 on 2011-06-16. Score: 0

The difficulty of reverse-engineering the algorithm seems to depend on how much of the keyspace has already been expired.

Say the algorithm of Mr. X is very restricted, so there are (say) only 10,000 potentially valid keys.
If Mr. X only recently started this company, so there are very few expired keys -- and hence few "false negatives" -- then reverse-engineering the algorithm may be relatively easy.
If Mr. X has already expired 9,000 of the potentially valid keys, and so we have 9 out of 10 "false negatives", then reverse-engineering the algorithm seems to be much more difficult.
And, of course, if Mr. X has already expired every potentially valid key except for the ones that Mr. Y and his collaborators already know, then the "taciturn oracle" will give him zero new information.


---

### Answer by username_2 on 2011-06-16. Score: 0

It appears that only finitely many valid passwords can in fact be used. If the password language is finite, then there is no hope (as in this case, all of the valid passwords may be used, in which case the oracle always returns FALSE).

Otherwise, simply restrict the learning process to sufficiently large samples. As this is a finite requirement, it does not change the complexity of the problem.
You can use an exponential strategy to search for $N$ for sufficiently large. Try learning on queries $> 2^n$; if the learning algorithms fails increment $n$.


---

