Karan joshi
Karan joshi

Reputation: 73

What is Decryption algorithm for Cisco Type 7?

I want the algorithm for cisco type 7 encryption and decryption. On searching, I found out that it uses Vigenere cipher encryption but it won't work. Please anybody help me out. If I found some small lead then also it will be good.

Thank You.

Upvotes: -1

Views: 764

Answers (2)

Mister_Tom
Mister_Tom

Reputation: 1564

The algorithm is published in a Global Information Assurance Certification (GIAC) Paper titled "Cisco IOS type 7 password vulnerability." SANS Submission date September 24, 2000. https://www.giac.org/paper/gcih/84/cisco-ios-type-7-password-vulnerability/100566

There is an even better description of the algorithm in the PassLib documentation page titled "Cisco “Type 7” hash." https://passlib.readthedocs.io/en/stable/lib/passlib.hash.cisco_type7.html

The "Type-7" algorithm is an XOR cipher with a hard-coded key-string which is shifted by an offset referred to as the "salt." My interpretation after writing code that performs this Type-7 decoding, it is NOT a Vigenère cipher.

Upvotes: 1

Steve Martin
Steve Martin

Reputation: 75

Decrypting a type 7 key is pretty straight forward if you have the hash value and access to a Cisco device

Create a key chain

config t
!
key-chain test
 key 1
 key-string 7 "put your hash here"
end
!
show key chain

Note- some of the newer code will not allow you to see the keys however this method usually works and can be used to see the clear-text version of a key.

Upvotes: 2

Related Questions