1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
topjm [15]
3 years ago
6

You and your friend who lives far away want to fairly and randomly select which of the two of you will travel to the other’s hom

e for a visit. Your friend remembers having learned about using hashes as cryptographic commitments and proposes to use a coin toss to decide. He tells you to randomly choose ‘heads’ or ‘tails’ by throwing a coin, hash the result using sha256, and send him the hash. Once you have committed to the outcome, he’ll guess ‘heads’ or ‘tails’, you’ll reveal to him your choice and he can verify that the hash is correct. If his choice matches your coin toss, then your friend wins and you have to make the trip. What is the problem with this scheme, as described?
a.there’s no way to prove that your coin toss is random
b.there’s no way to prove that sha256 is collision resistant
c.your friend can hash all possible options and discover your secret
d.unless you sign the hash message your friend can’t be sure it was you who sent it
Computers and Technology
1 answer:
Phantasy [73]3 years ago
6 0

Answer:

c. your friend can hash all possible options and discover your secret.

Explanation:

SHA-256 is a set of hash functions that was designed by the NSA. SHA-2 is considered an upgrade on the set that was its predecessor, SHA-1. A hash is a mathematical function that condenses data in a process of one-way encryption. SHA-256 creates hash algoritms that are considered irreversible and unique. However, one of the properties of hashing algorithms is determinism, which means that any computer in the world would be able to compute a particular hash and get the same answer.

You might be interested in
Your computer uses 4 bits to represent decimal numbers (0, 1, 2, 3 and so on) in binary. What is the SMALLEST number for which a
natali 33 [55]
2 I think because 2 I think is binary I’m sorry if this is wrong
8 0
3 years ago
Make a program that prints each line of its input that mentions fred. (It shouldn’t do anything for other lines of input.) Does
Vitek1552 [10]

Answer:

See Explaination

Explanation:

This assume that input is a file and is given on command line. Please note this will ot print lines with frederick as thats what I feel question is asking for

#!/usr/bin/perl -w

open(FILE, $ARGV[0]) or die("Could not open the file $ARGV[0]");

while ($line = <FILE>){

if($line=~/\s+fred\s+/)

{

print $line;

}

}

close(FILE);

8 0
3 years ago
I need to create a method named "root positive". which will either print the square root of the number passed to it or if the nu
rjkz [21]

Answer:

Explanation:

The following code is written in Java. It is a method that calculates the square root of a number as requested. The method first checks with an IF statement if the parameter value is a positive number and then calculates the square root and prints it to the screen. Otherwise, it prints Number must not be negative. A test case has been provided in the main method and the output can be seen in the attached image below.

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.print("Enter a number of type double to calculate square root:");

       double num = in.nextDouble();

       rootPositive(num);

   }

   public static void rootPositive(double num) {

       if (num > 0) {

           System.out.println(Math.sqrt(num));

       } else {

           System.out.println("Number must not be negative.");

       }

   }

}

5 0
3 years ago
Which of the following rules should be used to keep the appropriate distance between your vehicle and the vehicle in front of yo
S_A_V [24]
I would say two car length rule. I am not sure what the official license rule is or if it has been changed, but originally the rule was 3 seconds usually depending on how fast the car is going. The faster you are going, the longer it takes to stop. So two-car length rule would probably be the best choice. Definitely not A.
8 0
3 years ago
Read 2 more answers
How many acute angles are in a square​
babymother [125]
0, a square has 4 right angles
7 0
2 years ago
Read 2 more answers
Other questions:
  • Electronic ledger that tracks mathematical data
    15·1 answer
  • If you want to conserve ink or toner, you can instruct powerpoint to print ____ documents.
    6·1 answer
  • How do i do a class in java??
    5·1 answer
  • #Write a function called alter_list. alter_list should have#two parameters: a list of strings and a list of integers.##The list
    11·1 answer
  • What are the different nail disorders?
    13·1 answer
  • Jeremy is working with a team that is creating an application using attributes and associated methods. What type of programming
    8·1 answer
  • What can be the maximum possible length of an identifier 3163 79 can be of any length​
    5·1 answer
  • Use the syntax SELECT ________ (expression) [Column Name] to limit the result set to the number of rows defined by the expressio
    10·1 answer
  • Define a function below, filter_out_strs, which takes a single argument of type list. Complete the function so that it returns a
    10·1 answer
  • What is one disadvantage people face without a checking account?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!