Is there necessarily an infinite number of inputs to any given output in a crypto hash function? [migrated]

This might be a very easy question. Let’s consider cryptograhic hash functions with the usual properties, weak and strong collision resistance and preimage resistance.

For any given output, obviously there are multiple inputs. But is that necessarily an infinite number of preimages, for any given hash value?

How would I go about giving a formal proof that there exists no crypto hash function h() such that there is a given value v = h(m*) for which the possible set of inputs m* is finite? Would this necessarily break collision resistance?

Can I safely sell a used keyboard without risk of new owner recovering previous inputs?

As far as of my knowledge goes, keyboard don’t store keystrokes in their memory by default (excluding those bundled with keyloggers). The thing that comes to my mind though is that some keyboards do have some built-in memory for storing user’s preferences (e.g. gaming keyboards). Can this be somehow reprogrammed to store other data than just LEDs color combo?

Can I sell my keyboard without worrying that new owner might recover previous input in some way?

Cheers, Dominic

Can bruteforce attacks be prevented with tables of valid inputs?

Can this method of encryption prevent bruteforce attacks?

If I had a hypothetical table (or function) where every grammatically valid sentence (in existence, limited to some number of words) was given an associated number, e.g:

"Good morning, how are you." = 3283 "Today is a nice day." = 2183 

Then added a number (as a key), e.g:

3283 + 1234 = 4516 

Wouldn’t this final output of 4516 be effectively protected against bruteforce attacks?

Ignoring the difficulty of producing a hashtable/function capable of reducing every valid input into a single number, and the issue of sending the key 1234 securely.

Is there any way of finding the original input only from the output?

Is limiting the domain of the encryption to only valid inputs, an effective method of preventing bruteforce attacks?

If so is there any practical example of this? Why or why not?

Phone Number inputs from 1 string to 3 inputs. Help!

My team is needing to change a phone number object within a form to 3 input fields instead of one string. This is turning out to potentially be slightly challenging for our team on the technical side so I thought I’d reach out to see if anyone has encountered this before or used a phone number widget in lieu of 3 separate inputs to handle country code, area code, and number? It’s clearly not a new problem but it is for my team ­čÖé

Where to put submit button in a long screen with multiple inputs

I’m redoing a web configuration UI for a piece of hardware. Think of a configuration UI of a standard router. You install this hardware into your network and access configuration through your browser. The UI will normally be accessed from PC and should also be available for mobile devices, but PC is definitely in a focus here.

I need to implement a configuration form with a submit button. The old design was done in material design and had this layout: enter image description here

Form1, Form2 are a bit different configuration forms, that have a similar topic (Currently active SubMenu1). Think of “IP Address”, “Router Name”, “DHCP Configuration” etc. if it was a router. All of these have the same Submit button in the right top corner that applies only the changed inputs. For example if there is an input for a password, it will be applied only if it was changed, otherwise, the old password stays even though the input was empty. The submit button, although located on a menu bar is floating (when the menu bar is not) and always stays on the screen in exactly the same location when you scroll.

I’m redoing a UI similarly, preserving looks more or less, but changing the forms to be grouped in cards instead:

enter image description here

But I’m hesitant to use the same location for Submit button, as I believe there are serious issues with it from UI/UX perspective.

  1. The location is extremely weird and unintuitive. The button is located on the menu that is common for all views and simply appears/disappears depending on the view. Users do not expect it to be there
  2. The button although located on the menu is not attached to it and floats when menu is not.
  3. It is not obvious that if you do not change the password input and leave it empty, the password is not changed. My first thought is that this submits an empty password to the system. However, I’m not 100% sure this is a problem, just find it weird.

The problem is I do not know where to put submit button here. My first guess it to make it floating and to put it in the lower right corner. I do not know how to fix the password problem though.

Is this a good suggestion? If not what should I do? And is this a good idea to leave the password box as is, or it needs to be changed?

Ubuntu 18.04 suspends when switching monitor inputs

I have two monitors in a multi-computer setup. I have my Ubuntu 18.04 Dell XPS 15 laptop docked and connected to both monitors as well (each monitor has an HDMI switch to determine which computer to display). If at any point both of my monitors are switched to an input other than my laptop, Ubuntu suspends or otherwise stops sending signal to the monitors. Switching my monitor’s input back to my laptop results in no signal. At that point I’m required to pull my monitor out of its mount and open it in order to regain signal on my monitors.

While my laptop is docked the lid is closed and the built-in display turned off. I’d really like to be able to maintain the signal that my laptop is sending to my monitors so that I can easily switch back to Ubuntu after accessing my other computer, and after significant searching I have yet to find a way to do this.

how to disable inputs inside in Sharepoint 2013 form

I want to disabled/readonly inputs on some fields in Sharepoint 2013 New/Edit forms based on a field’s value. So I manually add around group of .

… … …

I have tried two different method, see code below.

$ (“#myDiv *”).prop(“disabled”, true); $ (“#myDiv”).children().prop(‘disabled’,true);

Neither one is working. I have to disabled each field one by one. Any suggestion for the coding would be appreciated. Thanks!

┬┐Como sumar el valor dinamicamente de inputs text que se encuentran dentro de un For each con Jquery?

Como podria hacer la suma de cada uno de los inputs es decir tengo la estructura

<table>      @foreach (var item in Model){      <tr><td>@Html.DisplayFor(modelItem => item.CLIENTE)</td>     <td> <input type="text" class="solo-numero amt" style="width:70% !important; text-align:right" value="variable con mi valor"/>     </td> <td> <input type="text" class="solo-numero amt" style="width:70% !important; text-align:right" value="variable con mi valor"/> <tr> </table> 

tenido esto en cuenta eh logrado con javascript sumar unicamente el los primeros inputs que genera el for each, pero no los demas que genera el for each: eh usado esto en jquery para lograr sumar los valores:

$  ('.amt').keyup(function () {                 var importe_total = 0                 $  (".amt").each(                     function (index, value) {                         if ($  .isNumeric($  (this).val())) {                             importe_total = importe_total + eval($  (this).val());                             //console.log(importe_total);                         }                     }                 );                 $  ("#inputTotal").val(importe_total);             }); 

como explico esos input’s si se me generan el el foreach pero al momento de que me muestre el resultado solo puedo generar en el primer input de resultado que tiene esta estructura:

<td> <input type="text" id="inputTotal" class="solo-numero" style="width:18% !important; margin-right:-2px; text-align:right" /> <td> 

lo que necesito es que la funcionalidad del jquery aplique para cada inputTotal que se genera en cada foreach, ya que que solo funciona para el primero donde si me muestra la suma de los dos inputs anteriores.

inputs rederizados por un map, como guardar los datos de cada uno de los inputs en un state diferente?

estoy haciendo una practica en react soy principiante y tengo esta inc├│gnita, en esta practica tengo unos inputs que se renderizan de manera dinamica por un map, como har├şa para que cada dato de cada uno de los inputs renderizados se guarde en un state diferente. este es mi c├│digo hasta los momentos, gracias de antemano.

export class RenderizadoPrueba extends Component{    constructor(props){     super(props);     this.state ={       values: '',       nroRenderElemento: 3,       inputs: []     }     this.handleChange = this.handleChange.bind(this);     this.handleSubmit = this.handleSubmit.bind(this);   }    handleChange(e){     this.setState({         value: e.target.value     });   }    handleSubmit(e){     console.log('Este es el nombre introducido:', this.state.value);     e.preventDefault();   }    componentDidMount(){     this.setState({       inputs: [... Array(this.state.nroRenderElemento)].map((input, i) =>         <label key={input}>           Introduzca su Nombre:           <input type="text" name={i} onChange={this.handleChange}/>         </label>       )     })   }    render(){     return(       <div>          <form onSubmit={this.handleSubmit}>           {this.state.inputs}           <input type="submit" value="Submit"/>         </form>       </div>     )   } }