You can use your Mac's internet sharing function to do this.
Go to System Preferences and under Internet and Network there is an option for Sharing.
Go there and you can tell the Mac to share the ethernet connection via the airport card in the Mac. Under the "Share your connection from" drop down menu, select "built-in ethernet" and from the "To computers using" option select airport.
You will be prompted to set up a password and use that password on your iPhone to join the network.
I have used this often with my iPhone or to share an ethernet connection in a hotel room. It works well but I do not know what type of security is being used in that connection.