Cryptography: RSA and Factoring; Digital Signatures; Ssh



Similar documents
Digital Signature CHAPTER 13. Review Questions. (Solution to Odd-Numbered Problems)

TELE 301 Network Management. Lecture 16: Remote Terminal Services

CIS 6930 Emerging Topics in Network Security. Topic 2. Network Security Primitives

Signature Schemes. CSG 252 Fall Riccardo Pucella

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

TS-800. Configuring SSH Client Software in UNIX and Windows Environments for Use with the SFTP Access Method in SAS 9.2, SAS 9.3, and SAS 9.

Credit Card Security

CS 758: Cryptography / Network Security

Security. Friends and Enemies. Overview Plaintext Cryptography functions. Secret Key (DES) Symmetric Key

Cryptography and Network Security

Outline. CSc 466/566. Computer Security. 8 : Cryptography Digital Signatures. Digital Signatures. Digital Signatures... Christian Collberg

Lecture 6 - Cryptography

Secure access to the DESY network using SSH

Digital Signatures. Murat Kantarcioglu. Based on Prof. Li s Slides. Digital Signatures: The Problem

CSCE 465 Computer & Network Security

SSH, SCP, SFTP, Denyhosts. Süha TUNA Res. Assist.

Network-Enabled Devices, AOS v.5.x.x. Content and Purpose of This Guide...1 User Management...2 Types of user accounts2

How To Use Amazon Cloud 2 On Linux And Windows 2 On A Pc Or Mac Or Ipad (For Pc) On A Microsoft Mac Or Macbook Or Ipa (For Mac) On An Ubuntu Or Ipro (For Windows

CS 348: Computer Networks. - Security; 30 th - 31 st Oct Instructor: Sridhar Iyer IIT Bombay

SECURITY IN NETWORKS

The Mathematics of the RSA Public-Key Cryptosystem

Tighter SSH Security with Two-Factor

Contingency Access to Enterprise Encrypted Data

Network Security. Computer Networking Lecture 08. March 19, HKU SPACE Community College. HKU SPACE CC CN Lecture 08 1/23

Outline. Computer Science 418. Digital Signatures: Observations. Digital Signatures: Definition. Definition 1 (Digital signature) Digital Signatures

Introduction to Cryptography CS 355

1 Message Authentication

Security Configuration Guide P/N Rev A05

Encrypted File Transfer - Customer Testing

Elements of Security

2 Advanced Session... Properties 3 Session profile... wizard. 5 Application... preferences. 3 ASCII / Binary... Transfer

Mathematics of Internet Security. Keeping Eve The Eavesdropper Away From Your Credit Card Information

Automated Offsite Backup with rdiff-backup

SSH and FTP on Ubuntu WNYLUG Neal Chapman 09/09/2009

Network Security. Security Attacks. Normal flow: Interruption: 孫 宏 民 Phone: 國 立 清 華 大 學 資 訊 工 程 系 資 訊 安 全 實 驗 室

SSL Tunnels. Introduction

Elliptic Curve Cryptography

RSA Attacks. By Abdulaziz Alrasheed and Fatima

Security: Focus of Control. Authentication

1.2 Using the GPG Gen key Command

Configuring SSH and Telnet

Chapter 10. Network Security

CIS 5371 Cryptography. 8. Encryption --

Symmetric Key cryptosystem

An Overview of the Secure Shell (SSH)

Personal Secure Certificate

Network Security (2) CPSC 441 Department of Computer Science University of Calgary

Chapter 7: Network security

Step One: Installing Rsnapshot and Configuring SSH Keys

CIS 433/533 - Computer and Network Security Public Key Crypto/ Cryptographic Protocols

Key Management. CSC 490 Special Topics Computer and Network Security. Dr. Xiao Qin. Auburn University

Module: Applied Cryptography. Professor Patrick McDaniel Fall CSE543 - Introduction to Computer and Network Security

Secure Network Communication Part II II Public Key Cryptography. Public Key Cryptography

Cryptography: Authentication, Blind Signatures, and Digital Cash

Practice Questions. CS161 Computer Security, Fall 2008

Tera Term Telnet. Introduction

Secure File Transfer Installation. Sender Recipient Attached FIles Pages Date. Development Internal/External None 11 6/23/08

Cryptography Lecture 8. Digital signatures, hash functions

DarkFS - An Encrypted File System

SSH with private/public key authentication

Cryptography and Security

CPSC 467b: Cryptography and Computer Security

Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur

SSH! Keep it secret. Keep it safe

Overview of Public-Key Cryptography

Public Key Infrastructure in idrac

PT Activity: Configure Cisco Routers for Syslog, NTP, and SSH Operations

Introduction to Computer Security

Security. Contents. S Wireless Personal, Local, Metropolitan, and Wide Area Networks 1

File transfer clients manual File Delivery Services

SubmitedBy: Name Reg No Address. Mirza Kashif Abrar T079 kasmir07 (at) student.hh.se

Discrete logarithms within computer and network security Prof Bill Buchanan, Edinburgh Napier

Number Theory and Cryptography using PARI/GP

Network Security. HIT Shimrit Tzur-David

Symmetric and Public-key Crypto Due April , 11:59PM

Advanced Cryptography

Network Security. Network Security. Security in Computer Networks

1 Digital Signatures. 1.1 The RSA Function: The eth Power Map on Z n. Crypto: Primitives and Protocols Lecture 6.

Lab Configure Basic AP Security through IOS CLI

Lukasz Pater CMMS Administrator and Developer

Overview Keys. Overview

Security Digital Certificate Manager

CRYPTOGRAPHY IN NETWORK SECURITY

An Introduction to Cryptography and Digital Signatures

WS_FTP Professional 12. Security Guide

Using sftp in Informatica PowerCenter

SSH Key Exchange: Windows client to Unix/Linux server

Network Security Technology Network Management

Principles of Network Security

RemotelyAnywhere. Security Considerations

Efficient construction of vote-tags to allow open objection to the tally in electronic elections

Common security requirements Basic security tools. Example. Secret-key cryptography Public-key cryptography. Online shopping with Amazon

CS Computer Security Third topic: Crypto Support Sys

Security in Distributed Systems. Network Security

Paillier Threshold Encryption Toolbox

Transcription:

Cryptography: RSA and Factoring; Digital Signatures; Ssh Greg Plaxton Theory in Programming Practice, Spring 2005 Department of Computer Science University of Texas at Austin

The Hardness of Breaking RSA One approach to breaking RSA is to try to compute the private key (d, n) from the public key (e, n), i.e., to compute d from e and n No one has proven that this is the only way to break RSA, but many experts believe that this is the case In what follows we will argue that the problem of computing d from e and n is essentially equivalent in difficulty to the problem of factoring n Given the prime factors p and q of n, it is possible to compute d efficiently Given d such that de is congruent to 1 modulo φ(n), it is possible to factor n efficiently

Computation of d from e, p, and q Note the symmetry of RSA with respect to d and e We can switch the public/private roles of the keys (d, n) and (e, n), and the scheme still works This property will come in handy again later when we discuss digital signatures So we can compute d from e, p, and q in the same way that we previously computed e from d, p, and q Use the extended Euclid algorithm

Computation of p and q from d, e, and n We know that de 1 is a multiple of φ(n), so we can easily compute a multiple of φ(n) It can be shown that given such a multiple of φ(n), n can be factored efficiently The proof is somewhat technical, so we content ourselves with proving a weaker result, namely, that given n and φ(n) we can compute p and q efficiently Given n = pq and φ(n) = (p 1)(q 1) = n (p + q) + 1, we can easily compute p + q = n φ(n) + 1 Given n = pq and p + q we can compute p q since p q = (p q) 2 = (p + q) 2 4pq Given p q and p + q we can easily solve for p and q

Digital Signatures Desirable properties of a document intended for Bob that is electronically signed by Alice: Only Bob can decrypt the message, and he is convinced that it was sent by Alice Alice cannot deny signing the document No one can modify the document without invalidating Alice s signature RSA is widely used for such digital signatures Let s see how this can be done

Digital Signatures via RSA Suppose Alice wants to sign a document and send it to Bob She encrypts the document x with her private key fa 1, and then encrypts the result with Bob s public key f b, i.e., she sends Bob f b (fa 1 (x)) Bob decrypts by applying his private key f 1 b, yielding fa 1 (x), followed by Alice s public key f a, yielding x In cases where Bob might not be sure who is sending him the document, Alice can send f b (y) where y is the concatenation of Alice s name (in plaintext) and fa 1 (x) Note that Bob is not fooled if someone else s name is included instead If Carol s name is concatenated to fa 1 (x), Bob obtains gibberish when he computes f c (fa 1 (x))

Alice Cannot Deny Sending the Message An impartial judge can determine that Alice signed the document, since the only way to get anything sensible out of fa 1 (x) (which can be supplied by Bob) is to apply Alice s public key f a This assumes that Alice is the only person who knows her private key Safeguarding private keys is critical

No One Can Modify Alice s Signed Document Suppose Bob changes one or more bits of the encrypted document (x) f 1 a Application of Alice s public key f a then yields gibberish

Ensuring Security of Communication with a Trusted Third Party In an RSA cryptosystem, we often need to retrieve the public key of another party Such keys may be obtained from a trusted third party, David, who maintains a database of public keys We need to be wary of an attacker Eve who might intercept a request to David and respond with the wrong public key Solution: David signs any public keys that he sends out Eve can no longer pose as David

Another Application of Public Key Cryptography: Ssh Provides a secure version of telnet We will give a brief overview of ssh and some related tools The ssh environment consists of a network of hosts (machines) Each host has a unique public/private key pair Each host runs a daemon process sshd Users of these hosts set up certain files containing public and private keys in a manner to be described Users run ssh to connect from one host to another

Ssh: Basic User Configuration Within a user account (in the.ssh subdirectory), the following basic files are created/maintained Public/private key pairs are created using ssh-keygen Private key files should not be readable by other users; for added security, private key files are often encrypted using a passphrase An authorized keys file, maintained by the user, that contains a list of public keys such that the holder of any associated private key is authorized to connect to this account A known hosts file, maintained by ssh (but editable), that contains the verified public keys of the hosts to which this user has previously connected

Using Ssh: The Basics To (attempt to) connect to another account, run ssh user@host If no private key is specified on the command line, a default private key file is assumed; if the private key is passphrase-protected, the user is prompted for the passphrase If the public key of the target host does not appear in the known hosts file, then the public key of the target host is displayed, and the user is asked whether to accept it If the public key of the remote host is accepted, it is added to the known hosts file In high-security environments, a user might telephone someone to decide whether to accept a given host public key The attempt to connect succeeds if the associated public key resides in the authorized keys file of the target account If not, the user is prompted for the account password

Ssh: The scp Command The scp command is like the unix cp command, but it can be used to copy files between remote hosts The syntax is similar to cp, but the source and destination filenames may be prefixed with an account name followed by a colon (for example, user@host:file) The source and destination files can both be remote Before the copy operation is performed, the user is prompted for the necessary passphrases and/or passwords to access the relevant remote accounts As with ssh, this may result in the known hosts file being updated, et cetera

Ssh: Agents A shortcoming of ssh as thus far described is that the security-conscious user with passphrase-protected private keys is constantly being asked to enter passphrases An elegant solution to this problem is provided by the ssh-agent utility, which the user invokes to initiate an agent process The agent may be abstractly viewed as a container of private keys for which the user has already provided the associated passphrase The ssh-add utility is used to add a (local) private key to the agent; if the private key being added is passphrase-protected, the user is prompted for the passphrase When an agent process is running, it interacts with the remote ssh daemon whenever the user attempts to access a remote account (e.g., via ssh or scp) If one of the private keys held by the agent is sufficient to gain access, the user is not prompted for a passphrase

Ssh: Agent Forwarding The ssh daemon running on a given host can be configured to enable or disable agent forwarding If agent forwarding is enabled on host B, then a user running an agent on host A can ssh into an account on B, and then ssh from B to C The private keys contained in the agent running on host A can be used to gain access to C If agent forwarding is enabled on host C, the user can ssh from C to D using the agent on A, et cetera