# What is the difference between a forgery attack and an user impersonation attack? [closed]

I'm new to cryptography, so I was searching for a forgery attack, but unable to find anything.

Can anybody tell me the difference between forgery attack and user impersonation attack?

## closed as unclear what you're asking by Squeamish Ossifrage, kelalaka, AleksanderRas, e-sushi, Maarten Bodewes♦Oct 1 at 14:00

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• I'm currently not 100% sure on the definitions, but a forgery usually applies to a primitive, e.g. a signature or a MAC whereas an impersonation attack usually applies on the protocol-level. – SEJPM Jul 11 '18 at 19:56
• It would be helpful to provide references for where you encountered these terms – Ella Rose Jul 11 '18 at 20:02

In such a scheme, a user has a key pair $(k,vk)$ ($k$ and $vk$ can be the same or different). There is an algorithm $f(m,k)$ that takes a piece of data $m$ and the secret key $k$ as input, and output some cryptographic data $c$, and there is another algorithm $v(m,c,vk)$ that takes data $m$ and $c$, and the verification key $vk$, and outputs 1 if $c$ is indeed generated using $f$ from $m$ and $k$, and outputs 0 otherwise.
Forgery attack in this context means an attacker who has no knowledge of the secret key $k$ can generate a pair $(\bar{c},\bar{m})$ such that he has never seen $f(\bar{m},k)$ before, and $\bar{c}$ can pass the verification, i.e. $v(\bar{m},\bar{c},vk)=1$.